Giter VIP home page Giter VIP logo

Comments (12)

zsl-157 avatar zsl-157 commented on June 18, 2024

说一下,断流太严重了

from real-url.

iceynano avatar iceynano commented on June 18, 2024

贴一个我自己拼凑的,会打印四个线路

import json
import requests

rid = input('输入虎牙直播房间号:\n')
url = f"https://mp.huya.com/cache.php?m=Live&do=profileRoom&roomid={rid}"
headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36'
}
response = requests.get(url=url,headers=headers)
json_data = response.text
data = json.loads(json_data)

for lines in range(0,4):
    flv_url = data['data']['stream']['flv']['multiLine'][lines]['url']
    print(flv_url)

from real-url.

zsl-157 avatar zsl-157 commented on June 18, 2024

贴一个我自己拼凑的,会打印四个线路

import json
import requests

rid = input('输入虎牙直播房间号:\n')
url = f"https://mp.huya.com/cache.php?m=Live&do=profileRoom&roomid={rid}"
headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36'
}
response = requests.get(url=url,headers=headers)
json_data = response.text
data = json.loads(json_data)

for lines in range(0,4):
    flv_url = data['data']['stream']['flv']['multiLine'][lines]['url']
    print(flv_url)

https://mp.huya.com/cache.php?m=Live&do=profileRoom&roomid={rid}这个地址是在app端抓取到的吗?还是哪里?

from real-url.

zsl-157 avatar zsl-157 commented on June 18, 2024

贴一个我自己拼凑的,会打印四个线路

import json
import requests

rid = input('输入虎牙直播房间号:\n')
url = f"https://mp.huya.com/cache.php?m=Live&do=profileRoom&roomid={rid}"
headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36'
}
response = requests.get(url=url,headers=headers)
json_data = response.text
data = json.loads(json_data)

for lines in range(0,4):
    flv_url = data['data']['stream']['flv']['multiLine'][lines]['url']
    print(flv_url)

https://mp.huya.com/cache.php?m=Live&do=profileRoom&roomid={rid}这个地址是在app端抓取到的吗?还是哪里?

还有就是打印出来的flv_url是没办法直接用的,应该还要一个关键参数seqid

from real-url.

iceynano avatar iceynano commented on June 18, 2024

还有就是打印出来的flv_url是没办法直接用的,应该还要一个关键参数seqid

我用vlc直接播放没发现任何问题

from real-url.

zsl-157 avatar zsl-157 commented on June 18, 2024

还有就是打印出来的flv_url是没办法直接用的,应该还要一个关键参数seqid

我用vlc直接播放没发现任何问题

请问你这个https://mp.huya.com/cache.php?m=Live&do=profileRoom&roomid={rid}在哪里抓到的?app还是pc网页还是移动端网页呢?

from real-url.

iceynano avatar iceynano commented on June 18, 2024

还有就是打印出来的flv_url是没办法直接用的,应该还要一个关键参数seqid

我用vlc直接播放没发现任何问题

请问你这个https://mp.huya.com/cache.php?m=Live&do=profileRoom&roomid={rid}在哪里抓到的?app还是pc网页还是移动端网页呢?

https://www.52pojie.cn/forum.php?mod=viewthread&tid=1700120

from real-url.

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.