Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Toperlock authored Nov 30, 2023
1 parent 38fa7a0 commit f57b853
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ def get_content_from_url(url, n=6):
print('没有从订阅链接获取到任何内容')
# print('Không nhận được proxy nào từ link đăng ký')
return None
if not response_text:
response = tool.getResponse(url, custom_user_agent='clashmeta')
response_text = response.text
if any(response_text.startswith(prefix) for prefix in prefixes):
response_text = tool.noblankLine(response_text)
return response_text
Expand Down

0 comments on commit f57b853

Please sign in to comment.