projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d94badc
)
[openload] Fix extraction (closes #12002)
author
Sergey M․
<dstftw@gmail.com>
Fri, 17 Feb 2017 15:31:16 +0000
(22:31 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Fri, 17 Feb 2017 15:31:16 +0000
(22:31 +0700)
youtube_dl/extractor/openload.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/openload.py
b/youtube_dl/extractor/openload.py
index bd1120fd81b048f3f2112bdad0ac1c1fddf45b71..10896c442fdbe261b6d68b2076c2dbee2936d8fd 100644
(file)
--- 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]))
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]))
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
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,
title = self._og_search_title(webpage, default=None) or self._search_regex(
r'<span[^>]+class=["\']title["\'][^>]*>([^<]+)', webpage,