Fix 'local variable 'url_json' referenced before assignment'

This commit is contained in:
yoshiko2
2021-05-03 22:03:32 +08:00
parent de8cb063e3
commit ef87a626da

View File

@@ -78,11 +78,10 @@ def getTrailer(htmlcode):
video_url = video[0].replace('\'', '') video_url = video[0].replace('\'', '')
video_url = 'https://adult.contents.fc2.com/api/v2/videos/1603395/sample?key=' + video_url 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('\\', '') url_json = eval(ADC_function.get_html(video_url))['path'].replace('\\', '')
return url_json
else: else:
video_url = '' video_url = ''
return url_json
def main(number): def main(number):
try: try:
number = number.replace('FC2-', '').replace('fc2-', '') number = number.replace('FC2-', '').replace('fc2-', '')