Update getm3u.py

This commit is contained in:
frxz751113
2024-08-25 17:09:38 +08:00
committed by GitHub
parent 9deb947a02
commit a1cd9c5859
+2 -2
View File
@@ -78,7 +78,7 @@ def parse(address: str):
return parse_result return parse_result
def gen_m3u(group): def gen_m3u(group):
with open(sys.path[0] + "\\public\\iptv.m3u", "w+", encoding='utf-8') as f: with open("iptv.m3u", "w+", encoding='utf-8') as f:
f.write('#EXTM3U\n') f.write('#EXTM3U\n')
f.write(f'#EXT-X-VERSION {int(time.time())}\n') f.write(f'#EXT-X-VERSION {int(time.time())}\n')
f.write('\n') f.write('\n')
@@ -120,4 +120,4 @@ if __name__ == "__main__":
# print(f'打印result:{result}') # print(f'打印result:{result}')
except Exception as e: except Exception as e:
print(e) print(e)
gen_m3u(result) gen_m3u(result)