URLJOIN between m3u8 fornt url and back(main) url
import requests
url = "https://agmjjzyi.ixibeiren.com/20181101/WRm7KyCb/2500kb/hls/index.m3u8?wsSecret=3f625f84edd8021348089810c0375dce&wsTime=1578306531"
response = requests.get(url)
body = response.content
base_url = "https://agmjjzyi.ixibeiren.com/20181101/WRm7KyCb/2500kb/hls/"
ts_test_list = []
with open("index_sillicon.m3u8", "a") as f:
for n in body.split(b'\n'):
if n and not n.startswith(b"#"):
n = (base_url + str(n).replace("'", "")[1:])
if str(n).replace("'", "").startswith("b"):
n = str(n).replace("'", "")[1:]
f.write((str(n) + "\n"))