Git Product home page Git Product logo

Comments (2)

yangfeng1994 avatar yangfeng1994 commented on June 15, 2024

皮皮虾的,我这边给修复了,可以下载视频了。代码我贴上去一下

author: wongxy

--------------

https://h5.pipix.com/item/******************

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"]
# data["audios"] = [info["origin_video_download"]["url_list"][0]["url"]]
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: ")))

from spiders.

xiyaowong avatar xiyaowong commented on June 15, 2024

皮皮虾网页播放已经没有无水印的接口了

from spiders.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.