From 91fcb3c90ebace508bb948d5552b4e55a6a888dc Mon Sep 17 00:00:00 2001 From: Vijay Singh Date: Sun, 8 Jan 2017 22:27:28 +0530 Subject: [PATCH 1/5] Openload.py fix Just a minor fix for openload --- youtube_dl/extractor/openload.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/youtube_dl/extractor/openload.py b/youtube_dl/extractor/openload.py index 2ce9f3826..ff8c6f1e1 100644 --- a/youtube_dl/extractor/openload.py +++ b/youtube_dl/extractor/openload.py @@ -64,16 +64,17 @@ class OpenloadIE(InfoExtractor): raise ExtractorError('File not found', expected=True) ol_id = self._search_regex( - ']+id="[a-zA-Z0-9]+x"[^>]*>([0-9]+)', + ']+?id="[^"]*?"[^>]*?>([^<]+?)<\/span>', webpage, 'openload ID') - first_two_chars = int(float(ol_id[0:][:2])) + first_three_chars = int(float(ol_id[0:][:3])) + fifth_char = int(float(ol_id[3:5])) urlcode = '' - num = 2 + num = 5 while num < len(ol_id): urlcode += compat_chr(int(float(ol_id[num:][:3])) - - first_two_chars * int(float(ol_id[num + 3:][:2]))) + first_three_chars - fifth_char * int(float(ol_id[num + 3:][:2]))) num += 5 video_url = 'https://openload.co/stream/' + urlcode From ed7c16eb4b47100c010a49e2e4bbbcbfbaa887cd Mon Sep 17 00:00:00 2001 From: Vijay Singh Date: Sun, 8 Jan 2017 23:08:29 +0530 Subject: [PATCH 2/5] Removed slashes and question marks --- youtube_dl/extractor/openload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/openload.py b/youtube_dl/extractor/openload.py index ff8c6f1e1..8ee5942b9 100644 --- a/youtube_dl/extractor/openload.py +++ b/youtube_dl/extractor/openload.py @@ -64,7 +64,7 @@ class OpenloadIE(InfoExtractor): raise ExtractorError('File not found', expected=True) ol_id = self._search_regex( - ']+?id="[^"]*?"[^>]*?>([^<]+?)<\/span>', + ']+id="[^"]*"[^>]*>([^<]+?)', webpage, 'openload ID') first_three_chars = int(float(ol_id[0:][:3])) From 9637acfac1d202d4cafbb430fd158921ceb674fe Mon Sep 17 00:00:00 2001 From: Vijay Singh Date: Sun, 8 Jan 2017 23:09:09 +0530 Subject: [PATCH 3/5] Update openload.py --- youtube_dl/extractor/openload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/openload.py b/youtube_dl/extractor/openload.py index 8ee5942b9..acf7e6ff5 100644 --- a/youtube_dl/extractor/openload.py +++ b/youtube_dl/extractor/openload.py @@ -64,7 +64,7 @@ class OpenloadIE(InfoExtractor): raise ExtractorError('File not found', expected=True) ol_id = self._search_regex( - ']+id="[^"]*"[^>]*>([^<]+?)', + ']+id="[^"]*"[^>]*>([^<]+)', webpage, 'openload ID') first_three_chars = int(float(ol_id[0:][:3])) From 89258b840bdc38113e775d17212686008daadb1f Mon Sep 17 00:00:00 2001 From: Vijay Singh Date: Tue, 10 Jan 2017 09:00:26 +0530 Subject: [PATCH 4/5] Basic Regex! Fixed --- youtube_dl/extractor/openload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/openload.py b/youtube_dl/extractor/openload.py index acf7e6ff5..f3e47df6c 100644 --- a/youtube_dl/extractor/openload.py +++ b/youtube_dl/extractor/openload.py @@ -64,7 +64,7 @@ class OpenloadIE(InfoExtractor): raise ExtractorError('File not found', expected=True) ol_id = self._search_regex( - ']+id="[^"]*"[^>]*>([^<]+)', + ']+id="[^"]+"[^>]*>([^<]+)', webpage, 'openload ID') first_three_chars = int(float(ol_id[0:][:3])) From 8551592fe999dc0bd1ee5995e10e5921b254991e Mon Sep 17 00:00:00 2001 From: Vijay Singh Date: Wed, 11 Jan 2017 09:20:32 +0530 Subject: [PATCH 5/5] Fixed Extraction Again! They updated the code again. just a minor change. --- youtube_dl/extractor/openload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/openload.py b/youtube_dl/extractor/openload.py index f3e47df6c..259090c92 100644 --- a/youtube_dl/extractor/openload.py +++ b/youtube_dl/extractor/openload.py @@ -73,7 +73,7 @@ class OpenloadIE(InfoExtractor): num = 5 while num < len(ol_id): - urlcode += compat_chr(int(float(ol_id[num:][:3])) - + urlcode += compat_chr(int(float(ol_id[num:][:3])) + first_three_chars - fifth_char * int(float(ol_id[num + 3:][:2]))) num += 5