projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a3d8b38
)
[vpro] Fix playlist title extraction and update tests
author
Sergey M․
<dstftw@gmail.com>
Sun, 25 Sep 2016 15:03:18 +0000
(22:03 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Sun, 25 Sep 2016 15:26:06 +0000
(22:26 +0700)
youtube_dl/extractor/npo.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/npo.py
b/youtube_dl/extractor/npo.py
index f95867d589feddf5df3f34366d37b76f859efa41..ff02d03090a5b805613425f61c798e725dd752fa 100644
(file)
--- a/
youtube_dl/extractor/npo.py
+++ b/
youtube_dl/extractor/npo.py
@@
-459,7
+459,7
@@
class NPOPlaylistBaseIE(NPOIE):
class VPROIE(NPOPlaylistBaseIE):
IE_NAME = 'vpro'
_VALID_URL = r'https?://(?:www\.)?(?:tegenlicht\.)?vpro\.nl/(?:[^/]+/){2,}(?P<id>[^/]+)\.html'
class VPROIE(NPOPlaylistBaseIE):
IE_NAME = 'vpro'
_VALID_URL = r'https?://(?:www\.)?(?:tegenlicht\.)?vpro\.nl/(?:[^/]+/){2,}(?P<id>[^/]+)\.html'
- _PLAYLIST_TITLE_RE = r'<
title>\s*([^>]+?)\s*-\s*Teledoc\s*-\s*VPRO\s*</title>
'
+ _PLAYLIST_TITLE_RE = r'<
h1[^>]+class=["\'].*?\bmedia-platform-title\b.*?["\'][^>]*>([^<]+)
'
_PLAYLIST_ENTRY_RE = r'data-media-id="([^"]+)"'
_TESTS = [
_PLAYLIST_ENTRY_RE = r'data-media-id="([^"]+)"'
_TESTS = [
@@
-473,12
+473,13
@@
class VPROIE(NPOPlaylistBaseIE):
'description': 'md5:52cf4eefbc96fffcbdc06d024147abea',
'upload_date': '20130225',
},
'description': 'md5:52cf4eefbc96fffcbdc06d024147abea',
'upload_date': '20130225',
},
+ 'skip': 'Video gone',
},
{
'url': 'http://www.vpro.nl/programmas/2doc/2015/sergio-herman.html',
'info_dict': {
'id': 'sergio-herman',
},
{
'url': 'http://www.vpro.nl/programmas/2doc/2015/sergio-herman.html',
'info_dict': {
'id': 'sergio-herman',
- 'title': '
Sergio Herman: F
ucking perfect',
+ 'title': '
sergio herman: f
ucking perfect',
},
'playlist_count': 2,
},
},
'playlist_count': 2,
},
@@
-487,7
+488,7
@@
class VPROIE(NPOPlaylistBaseIE):
'url': 'http://www.vpro.nl/programmas/2doc/2015/education-education.html',
'info_dict': {
'id': 'education-education',
'url': 'http://www.vpro.nl/programmas/2doc/2015/education-education.html',
'info_dict': {
'id': 'education-education',
- 'title': '
2Doc
',
+ 'title': '
education education
',
},
'playlist_count': 2,
}
},
'playlist_count': 2,
}