擅长:python、mysql、java
<p>如果您只想制作一个简单的脚本,那么使用正则表达式可能会更容易</p>
<pre><code>import re, requests
s = requests.Session() #start the session
data = s.get(url) #http get request to download data
data = data.text #get the raw text
vidlinks = re.findall("src='(.*?).m3u8'/>", data) #find all between the two parts in the data
print(vidlinks[0] + ".m3u8") #print the full link with extension
</code></pre>