user-2167
19-05-2018, 05:41 AM
Unless I'm misunderstanding something, I think there might be a problem with the regex searching in programme names.
Here's the last few results from a query for some snooker:
Looks great. Except... that's as far as the regex will go, adding just one more whitespace to the end causes it to fail when based on perl regex, it should not.
As will searching for anything beyond that point in the name, e.g. I can't search for "Semi Final".
It feels like perhaps "Snooker: World Championship: 2018" is the programme name and thus searchable and the rest is something else that is concatenated with it, but I tried showing just the name field and that shows the same information, so it seems like the "Day 15 Semi-Finals, Morning..." stuff is part of the name.
So it's confusing that I can't regex on that. Any ideas?
Here's the last few results from a query for some snooker:
Code:
$ get_iplayer "^Snooker:\sWorld\sChampionship:\s2018" | tail
6258: Snooker: World Championship: 2018 - Day 15 Semi-Finals, Morning Session, BBC Two, b0b2q9dd
6259: Snooker: World Championship: 2018 - Day 15 Semi-Finals, Afternoon Session Part 2, BBC Two, b0b2q9dg
6260: Snooker: World Championship: 2018 - Day 15 Semi-Finals, Evening Session, BBC Two, b0b2q9dj
6261: Snooker: World Championship: 2018 - Day 16 Final, Afternoon Session, BBC Two, b0b2qggy
6262: Snooker: World Championship: 2018 - Day 16 Final, Evening Session, BBC Two, b0b2qgh0
6263: Snooker: World Championship: 2018 - Day 17 Final, Afternoon Session, BBC Two, b0b2qmf2
6264: Snooker: World Championship: 2018 - Day 17 Final, Evening Session, BBC Two, b0b2qmf4
6265: Snooker: World Championship: 2018 - Day 15 Semi-Finals, Afternoon Session, BBC One, b0b2wxnf
6266: Snooker: World Championship: 2018 - Day 14 Semi-Finals, Afternoon Session, BBC One, b0b3vj4d
INFO: 44 matching programmes
Looks great. Except... that's as far as the regex will go, adding just one more whitespace to the end causes it to fail when based on perl regex, it should not.
Code:
$ get_iplayer "^Snooker:\sWorld\sChampionship:\s2018\s"
get_iplayer 3.14.0-darwin, Copyright (C) 2008-2010 Phil Lewis
This program comes with ABSOLUTELY NO WARRANTY; for details use --warranty.
This is free software, and you are welcome to redistribute it under certain
conditions; use --conditions for details.
INFO: 0 matching programmes
As will searching for anything beyond that point in the name, e.g. I can't search for "Semi Final".
Code:
$ get_iplayer "Semi\sFinal"
get_iplayer 3.14.0-darwin, Copyright (C) 2008-2010 Phil Lewis
This program comes with ABSOLUTELY NO WARRANTY; for details use --warranty.
This is free software, and you are welcome to redistribute it under certain
conditions; use --conditions for details.
INFO: 0 matching programmes
It feels like perhaps "Snooker: World Championship: 2018" is the programme name and thus searchable and the rest is something else that is concatenated with it, but I tried showing just the name field and that shows the same information, so it seems like the "Day 15 Semi-Finals, Morning..." stuff is part of the name.
Code:
$ get_iplayer --fields name "Snooker:\sWorld\sChampionship:\s2018" | tail
6258: Snooker: World Championship: 2018 - Day 15 Semi-Finals, Morning Session, BBC Two, b0b2q9dd
6259: Snooker: World Championship: 2018 - Day 15 Semi-Finals, Afternoon Session Part 2, BBC Two, b0b2q9dg
6260: Snooker: World Championship: 2018 - Day 15 Semi-Finals, Evening Session, BBC Two, b0b2q9dj
6261: Snooker: World Championship: 2018 - Day 16 Final, Afternoon Session, BBC Two, b0b2qggy
6262: Snooker: World Championship: 2018 - Day 16 Final, Evening Session, BBC Two, b0b2qgh0
6263: Snooker: World Championship: 2018 - Day 17 Final, Afternoon Session, BBC Two, b0b2qmf2
6264: Snooker: World Championship: 2018 - Day 17 Final, Evening Session, BBC Two, b0b2qmf4
6265: Snooker: World Championship: 2018 - Day 15 Semi-Finals, Afternoon Session, BBC One, b0b2wxnf
6266: Snooker: World Championship: 2018 - Day 14 Semi-Finals, Afternoon Session, BBC One, b0b3vj4d
INFO: 44 matching programmes
So it's confusing that I can't regex on that. Any ideas?