Open addwater1 opened 1 year ago
可以用python對字串進行後處理,例如
start_index = m3u8url .find('src="')
if start_index != -1:
start_index += len('src="')
end_index = m3u8url .find('m3u8', start_index)
if end_index != -1:
src_url = m3u8url [start_index:end_index]+"m3u8"
print(src_url)
else:
print("未找到src屬性的結束引號")
else:
print("未找到src屬性")
m3u8url = src_url
比如输入网址https://jp.jable.tv/videos/ipzz-102/,得到的m3u8地址是https://assets-cdn.jable.tv/contents/videos_screenshots/35000/35852/preview.jpg" id="player" playsinline="" src="https://homi-doki-mani.mushroomtrack.com/hls/wXr2r2xSTWhEOkwBU3Jvqg/1694602926/35000/35852/35852.m3u8,实际上要的是src后面的那一串