Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

有最新的虎牙拉流地址方法么 #468

Open
Yuphee opened this issue Mar 1, 2024 · 17 comments
Open

有最新的虎牙拉流地址方法么 #468

Yuphee opened this issue Mar 1, 2024 · 17 comments

Comments

@Yuphee
Copy link

Yuphee commented Mar 1, 2024

No description provided.

@Yigehaoren8848
Copy link

说一下,断流太严重了

@iceynano
Copy link

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

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)

@Yigehaoren8848
Copy link

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

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端抓取到的吗?还是哪里?

@Yigehaoren8848
Copy link

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

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

@iceynano
Copy link

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

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

@Yigehaoren8848
Copy link

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

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

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

@iceynano
Copy link

还有就是打印出来的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

@djniche
Copy link

djniche commented Apr 28, 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)

感谢 好用..一点不卡缓冲

@Yuphee
Copy link
Author

Yuphee commented Apr 28, 2024 via email

1 similar comment
@Yuphee
Copy link
Author

Yuphee commented May 15, 2024 via email

@DreamL
Copy link

DreamL commented Jun 14, 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)

很好用, 感谢, 另外请问这个默认是什么清晰度, 如何切换清晰度?

@Yuphee
Copy link
Author

Yuphee commented Jun 14, 2024 via email

@wxhbts
Copy link

wxhbts commented Aug 8, 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)

现在会出现只能看3秒

@Yuphee
Copy link
Author

Yuphee commented Aug 8, 2024 via email

@iceynano
Copy link

现在会出现只能看3秒

我这边VLC正常播放

@wxhbts
Copy link

wxhbts commented Aug 12, 2024

现在会出现只能看3秒

我这边VLC正常播放

只是在部分主播出现3秒播放

@thep0y
Copy link

thep0y commented Aug 22, 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)

这样直接获取的源不一定能播放。
不过受此提示,更新了一下,虎牙暂时可用了,但我不怎么看虎牙,所以还需各位看LOL的粉丝们测试。

https://github.com/thep0y/lsar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants