赞
踩
# 导入requests模块,模拟发送请求 import requests # 导入json import json # 导入re import re # 定义请求头 headers = { 'Accept': '*/*', 'Accept-Language': 'en-US,en;q=0.5', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36' } # 正则表达式,根据条件匹配出值 def my_match(text, pattern): match = re.search(pattern, text) print(match.group(1)) print() return json.loads(match.group(1)) def download_video(old_video_url, video_url, audio_url, video_name): headers.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。