Python爬取m3u8
#____author:"xie"
#date:2020-08-04
# -*- coding:utf-8 -*-
import requests
import re
import time
import os
from bs4 import BeautifulSoup
import random,string
headers = {
'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36',
'Origin': 'https://www.nmgk.com',
'Referer': 'https://www.nmgk.com/'
}
def man():
url = [
'https://www.nmgk.com/t/1.html'
]
response = requests.get(url=url[0], headers=headers)
link=response.content.decode("utf-8")
total=re.findall(r'<a href="/t/1-(\d&