Commit initial du projet serverIPTV
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import requests
|
||||
|
||||
url = "http://xfvjwqjn.duperab.xyz/xmltv.php?username=VQNRZG7N&password=W3NFBDXY"
|
||||
|
||||
headers = {
|
||||
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
|
||||
"Accept-Language": "en-US,en;q=0.9,fr;q=0.8,fr-FR;q=0.7",
|
||||
"Cache-Control": "max-age=0",
|
||||
"Connection": "keep-alive",
|
||||
"Upgrade-Insecure-Requests": "1",
|
||||
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36 Edg/135.0.0.0"
|
||||
}
|
||||
|
||||
response = requests.get(url, headers=headers, verify=False)
|
||||
|
||||
if response.status_code == 200 and response.content:
|
||||
with open("epg.xml", "wb") as f:
|
||||
f.write(response.content)
|
||||
print("Download successful: epg.xml")
|
||||
else:
|
||||
print(f"Failed to download. Status code: {response.status_code}, Content length: {len(response.content)}")
|
||||
Reference in New Issue
Block a user