aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-02-17 22:31:16 +0700
committerSergey M․ <dstftw@gmail.com>2017-02-17 22:31:16 +0700
commit90fad0e74cd8079246c5f3d8150650b5f65f998b (patch)
treeeb737b37c414b770f2ce7d379b1ce6f0672f222e /youtube_dl
parentd94badc755228ee3159b9b499aa718d27fa472ed (diff)
[openload] Fix extraction (closes #12002)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/openload.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/youtube_dl/extractor/openload.py b/youtube_dl/extractor/openload.py
index bd1120fd8..10896c442 100644
--- a/youtube_dl/extractor/openload.py
+++ b/youtube_dl/extractor/openload.py
@@ -76,19 +76,16 @@ class OpenloadIE(InfoExtractor):
webpage, 'openload ID')
first_two_chars = int(float(ol_id[0:][:2]))
- urlcode = {}
+ urlcode = []
num = 2
while num < len(ol_id):
key = int(float(ol_id[num + 3:][:2]))
- urlcode[key] = compat_chr(int(float(ol_id[num:][:3])) - first_two_chars)
+ urlcode.append((key, compat_chr(int(float(ol_id[num:][:3])) - first_two_chars)))
num += 5
-
- sorted(urlcode, key=lambda key: urlcode[key])
- urllink = ''.join(['%s' % (value) for (key, value) in urlcode.items()])
-
- video_url = 'https://openload.co/stream/' + urllink
+ video_url = 'https://openload.co/stream/' + ''.join(
+ [value for _, value in sorted(urlcode, key=lambda x: x[0])])
title = self._og_search_title(webpage, default=None) or self._search_regex(
r'<span[^>]+class=["\']title["\'][^>]*>([^<]+)', webpage,