aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2019-10-15 15:18:51 +0100
committerRemita Amine <remitamine@gmail.com>2019-10-15 15:18:51 +0100
commit2af01c0293db53dc80c552df3986d0e088b65b76 (patch)
treee96bf3158486c79e3409c0e3f7a91049080acf82 /youtube_dl
parent7e05df71b7d8c0e1ea9beafff48275ef3c9e27d2 (diff)
[bokecc] improve player params extraction(closes #22638)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/bokecc.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/youtube_dl/extractor/bokecc.py b/youtube_dl/extractor/bokecc.py
index 86a7f4d7d..6017e8344 100644
--- a/youtube_dl/extractor/bokecc.py
+++ b/youtube_dl/extractor/bokecc.py
@@ -11,8 +11,8 @@ from ..utils import ExtractorError
class BokeCCBaseIE(InfoExtractor):
def _extract_bokecc_formats(self, webpage, video_id, format_id=None):
player_params_str = self._html_search_regex(
- r'<(?:script|embed)[^>]+src="http://p\.bokecc\.com/player\?([^"]+)',
- webpage, 'player params')
+ r'<(?:script|embed)[^>]+src=(?P<q>["\'])(?:https?:)?//p\.bokecc\.com/(?:player|flash/player\.swf)\?(?P<query>.+?)(?P=q)',
+ webpage, 'player params', group='query')
player_params = compat_parse_qs(player_params_str)
@@ -36,9 +36,9 @@ class BokeCCIE(BokeCCBaseIE):
_VALID_URL = r'https?://union\.bokecc\.com/playvideo\.bo\?(?P<query>.*)'
_TESTS = [{
- 'url': 'http://union.bokecc.com/playvideo.bo?vid=E44D40C15E65EA30&uid=CD0C5D3C8614B28B',
+ 'url': 'http://union.bokecc.com/playvideo.bo?vid=E0ABAE9D4F509B189C33DC5901307461&uid=FE644790DE9D154A',
'info_dict': {
- 'id': 'CD0C5D3C8614B28B_E44D40C15E65EA30',
+ 'id': 'FE644790DE9D154A_E0ABAE9D4F509B189C33DC5901307461',
'ext': 'flv',
'title': 'BokeCC Video',
},