Update iptv.py
This commit is contained in:
parent
8ea2609170
commit
b14b47e908
2
iptv.py
2
iptv.py
@ -20,7 +20,7 @@ ipv6_pattern = re.compile(r'^http://\[([a-fA-F0-9:]+)\]')
|
|||||||
def fetch_streams_from_url(url):
|
def fetch_streams_from_url(url):
|
||||||
print(f"正在爬取网站源: {url}")
|
print(f"正在爬取网站源: {url}")
|
||||||
try:
|
try:
|
||||||
response = requests.get(url, timeout=10)
|
response = requests.get(url, timeout=20)
|
||||||
response.encoding = 'utf-8'
|
response.encoding = 'utf-8'
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
return response.text
|
return response.text
|
||||||
|
Loading…
Reference in New Issue
Block a user