projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a4f12b
)
[bloomberg] Improve video id regex
author
Sergey M․
<dstftw@gmail.com>
Sat, 28 Nov 2015 16:41:39 +0000
(22:41 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Sat, 28 Nov 2015 16:41:39 +0000
(22:41 +0600)
youtube_dl/extractor/bloomberg.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/bloomberg.py
b/youtube_dl/extractor/bloomberg.py
index b6197d3f13fe8e6e4d5f38b201285baa5c8c4b8c..c28ed0c7978dfc1cea7e0596918d1727e3a43b24 100644
(file)
--- a/
youtube_dl/extractor/bloomberg.py
+++ b/
youtube_dl/extractor/bloomberg.py
@@
-28,7
+28,9
@@
class BloombergIE(InfoExtractor):
def _real_extract(self, url):
name = self._match_id(url)
webpage = self._download_webpage(url, name)
- video_id = self._search_regex(r'"bmmrId":"(.+?)"', webpage, 'id')
+ video_id = self._search_regex(
+ r'["\']bmmrId["\']\s*:\s*(["\'])(?P<url>.+?)\1',
+ webpage, 'id', group='url')
title = re.sub(': Video$', '', self._og_search_title(webpage))
embed_info = self._download_json(