From ef87a626dabb3a68f1a1765a543c6a88d3a3d659 Mon Sep 17 00:00:00 2001 From: yoshiko2 Date: Mon, 3 May 2021 22:03:32 +0800 Subject: [PATCH] Fix 'local variable 'url_json' referenced before assignment' --- WebCrawler/fc2.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/WebCrawler/fc2.py b/WebCrawler/fc2.py index ad483ed..6b4b220 100644 --- a/WebCrawler/fc2.py +++ b/WebCrawler/fc2.py @@ -78,11 +78,10 @@ def getTrailer(htmlcode): video_url = video[0].replace('\'', '') video_url = 'https://adult.contents.fc2.com/api/v2/videos/1603395/sample?key=' + video_url url_json = eval(ADC_function.get_html(video_url))['path'].replace('\\', '') + return url_json else: video_url = '' - return url_json - def main(number): try: number = number.replace('FC2-', '').replace('fc2-', '')