summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSergey M․ <[email protected]>2019-07-11 23:37:09 +0700
committerSergey M․ <[email protected]>2019-07-11 23:37:09 +0700
commit5fc0896168a9ff155475bfb0b7b66504c7077605 (patch)
treedb8133e5810ee09801a37ee73e21ddcbf53bec70
parente4d53148f506cfcfab8559d86b40c72b7db87a6f (diff)
downloadyoutube-dl-5fc0896168a9ff155475bfb0b7b66504c7077605.tar.gz
youtube-dl-5fc0896168a9ff155475bfb0b7b66504c7077605.zip
[beeg] Add support for api/v6 v2 URLs without t argument (closes #21701)
-rw-r--r--youtube_dl/extractor/beeg.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/youtube_dl/extractor/beeg.py b/youtube_dl/extractor/beeg.py
index c15a0ac8f..5788d13ba 100644
--- a/youtube_dl/extractor/beeg.py
+++ b/youtube_dl/extractor/beeg.py
@@ -33,6 +33,10 @@ class BeegIE(InfoExtractor):
'url': 'https://beeg.com/1941093077?t=911-1391',
'only_matching': True,
}, {
+ # api/v6 v2 w/o t
+ 'url': 'https://beeg.com/1277207756',
+ 'only_matching': True,
+ }, {
'url': 'https://beeg.porn/video/5416503',
'only_matching': True,
}, {
@@ -49,14 +53,17 @@ class BeegIE(InfoExtractor):
r'beeg_version\s*=\s*([\da-zA-Z_-]+)', webpage, 'beeg version',
default='1546225636701')
- qs = compat_urlparse.parse_qs(compat_urlparse.urlparse(url).query)
- t = qs.get('t', [''])[0].split('-')
- if len(t) > 1:
+ if len(video_id) >= 10:
query = {
'v': 2,
- 's': t[0],
- 'e': t[1],
}
+ qs = compat_urlparse.parse_qs(compat_urlparse.urlparse(url).query)
+ t = qs.get('t', [''])[0].split('-')
+ if len(t) > 1:
+ query.update({
+ 's': t[0],
+ 'e': t[1],
+ })
else:
query = {'v': 1}