mirror of
https://github.com/lalifeier/IPTV.git
synced 2025-12-16 23:10:57 +08:00
init
This commit is contained in:
4
iptv.py
4
iptv.py
@@ -116,7 +116,7 @@ def main():
|
|||||||
|
|
||||||
live_m3u_content = '#EXTM3U\n'
|
live_m3u_content = '#EXTM3U\n'
|
||||||
|
|
||||||
for channel in ['douyu', 'huya', 'yy', 'douyin', 'bilibili', 'afreecatv', 'pandatv', 'twitch']:
|
for channel in ['douyu', 'huya', 'yy', 'douyin', 'bilibili', 'afreecatv', 'pandatv', 'flextv', 'twitch']:
|
||||||
try:
|
try:
|
||||||
M3U_URL = f"{PROXY_URL}/{channel}/index.m3u?_={int(time.time() * 1000)}"
|
M3U_URL = f"{PROXY_URL}/{channel}/index.m3u?_={int(time.time() * 1000)}"
|
||||||
if channel in ['afreecatv', 'pandatv', 'twitch'] and not PROXY_URL:
|
if channel in ['afreecatv', 'pandatv', 'twitch'] and not PROXY_URL:
|
||||||
@@ -128,7 +128,7 @@ def main():
|
|||||||
m3u_content = requests.get(M3U_URL).text
|
m3u_content = requests.get(M3U_URL).text
|
||||||
channel_id = urlparse(M3U_URL).path.split('/')[1]
|
channel_id = urlparse(M3U_URL).path.split('/')[1]
|
||||||
|
|
||||||
if channel not in ['afreecatv', 'pandatv', 'twitch']:
|
if channel not in ['afreecatv', 'pandatv', 'flextv', 'twitch']:
|
||||||
write_to_file(os.path.join(M3U_DIR, channel_id + '.m3u'), m3u_content)
|
write_to_file(os.path.join(M3U_DIR, channel_id + '.m3u'), m3u_content)
|
||||||
logger.info(f"Successfully downloaded and saved M3U file for channel {channel_id}")
|
logger.info(f"Successfully downloaded and saved M3U file for channel {channel_id}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user