Closed yangfeng1994 closed 4 years ago
皮皮虾的,我这边给修复了,可以下载视频了。代码我贴上去一下
import re import requests
def get(url: str) -> dict: """ title、audios """ data = {} headers = { "user-agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25" } item_id = re.findall(r"item/(\d+)", requests.get(url=url).url) if not item_id: return {"msg": "获取失败"} item_id = item_id[0] info_url = f"https://h5.pipix.com/bds/webapi/item/detail/?item_id={item_id}&source=share" with requests.get(info_url, headers=headers, timeout=10) as rep: if rep.status_code != 200 or rep.json().get("status_code") != 0: return {"msg": "获取失败"} info = rep.json()["data"]["item"] data["title"] = info["share"]["title"]
videoUrl = [info["video"]["video_download"]["url_list"][0]["url"]]
if videoUrl is None or len(videoUrl) == 0:
videoUrl = [info["video"]["video_download"]["url_list"][1]["url"]]
data["videos"] = videoUrl
return data
if name == "main": print(get(input("url: ")))
皮皮虾网页播放已经没有无水印的接口了
皮皮虾的无法获取到链接了,博主什么时候有时间,给更新一下呗。