diff --git a/src/you_get/downloader/xiami.py b/src/you_get/downloader/xiami.py index 82223e06..127da043 100644 --- a/src/you_get/downloader/xiami.py +++ b/src/you_get/downloader/xiami.py @@ -7,7 +7,6 @@ from ..common import * from xml.dom.minidom import parseString from urllib import parse -from urllib.error import HTTPError def location_dec(str): head = int(str[0]) @@ -29,18 +28,7 @@ def location_dec(str): return parse.unquote(out).replace("^", "0") def xiami_download_lyric(lrc_url, file_name, output_dir): - lrc = '' - for i in range(10): - try: - lrc = get_html(lrc_url, faker = True) - except HTTPError as e: - if e.code == 404 or e.code == 416 or e.code == 504: - print(e.msg) - break - else: - raise e - break - + lrc = get_html(lrc_url, faker = True) if len(lrc) > 0: with open(output_dir + "/" + file_name.replace('/', '-').replace('?', '-') + '.lrc', 'w', encoding='utf-8') as x: x.write(lrc)