projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[extractor/generic] Use compat_urllib_parse_unquote for unquoting video_id and title...
[youtube-dl]
/
youtube_dl
/
extractor
/
senateisvp.py
diff --git
a/youtube_dl/extractor/senateisvp.py
b/youtube_dl/extractor/senateisvp.py
index fa661026142842d8f8ffa0157302bfce77544455..9c53704ea383b1af34e8f8157e327b71c2c3865a 100644
(file)
--- a/
youtube_dl/extractor/senateisvp.py
+++ b/
youtube_dl/extractor/senateisvp.py
@@
-48,7
+48,7
@@
class SenateISVPIE(InfoExtractor):
["arch", "", "http://ussenate-f.akamaihd.net/"]
]
_IE_NAME = 'senate.gov'
["arch", "", "http://ussenate-f.akamaihd.net/"]
]
_IE_NAME = 'senate.gov'
- _VALID_URL = r'http://www\.senate\.gov/isvp/\?(?P<qs>.+)'
+ _VALID_URL = r'http://www\.senate\.gov/isvp/
?
\?(?P<qs>.+)'
_TESTS = [{
'url': 'http://www.senate.gov/isvp/?comm=judiciary&type=live&stt=&filename=judiciary031715&auto_play=false&wmode=transparent&poster=http%3A%2F%2Fwww.judiciary.senate.gov%2Fthemes%2Fjudiciary%2Fimages%2Fvideo-poster-flash-fit.png',
'info_dict': {
_TESTS = [{
'url': 'http://www.senate.gov/isvp/?comm=judiciary&type=live&stt=&filename=judiciary031715&auto_play=false&wmode=transparent&poster=http%3A%2F%2Fwww.judiciary.senate.gov%2Fthemes%2Fjudiciary%2Fimages%2Fvideo-poster-flash-fit.png',
'info_dict': {
@@
-72,12
+72,16
@@
class SenateISVPIE(InfoExtractor):
'ext': 'mp4',
'title': 'Integrated Senate Video Player'
}
'ext': 'mp4',
'title': 'Integrated Senate Video Player'
}
+ }, {
+ # From http://www.c-span.org/video/?96791-1
+ 'url': 'http://www.senate.gov/isvp?type=live&comm=banking&filename=banking012715',
+ 'only_matching': True,
}]
@staticmethod
def _search_iframe_url(webpage):
mobj = re.search(
}]
@staticmethod
def _search_iframe_url(webpage):
mobj = re.search(
- r"<iframe[^>]+src=['\"](?P<url>http://www\.senate\.gov/isvp/\?[^'\"]+)['\"]",
+ r"<iframe[^>]+src=['\"](?P<url>http://www\.senate\.gov/isvp/
?
\?[^'\"]+)['\"]",
webpage)
if mobj:
return mobj.group('url')
webpage)
if mobj:
return mobj.group('url')
@@
-133,15
+137,9
@@
class SenateISVPIE(InfoExtractor):
self._sort_formats(formats)
self._sort_formats(formats)
-
info_dict =
{
+
return
{
'id': video_id,
'title': title,
'id': video_id,
'title': title,
+ 'formats': formats,
'thumbnail': thumbnail,
}
'thumbnail': thumbnail,
}
-
- if len(formats) >= 1:
- info_dict.update({'formats': formats})
- else:
- info_dict.update(formats[0])
-
- return info_dict