Skip to content
This repository has been archived by the owner on Oct 31, 2020. It is now read-only.

YouTube Error 429 #12

Open
John-Smith-SG opened this issue Jul 23, 2019 · 1 comment
Open

YouTube Error 429 #12

John-Smith-SG opened this issue Jul 23, 2019 · 1 comment

Comments

@John-Smith-SG
Copy link

John-Smith-SG commented Jul 23, 2019

使用record_streamlink.sh抓取youtube直播源并推流,报错 HTTP ERROR 429。
查询原因为访问过频,IP被ban(暂时或永久未知)。

服务器有桌面环境,火狐打开youtube视频需要完成reCAPTCHA验证,之后能正常看普通视频,直播依旧无法播放。
github2

尝试将cookies导入youtube-dl提取直播视频的m3u8,报错:

youtube-dl --cookies /root/vtuber/cookies.txt -g https://www.youtube.com/watch?v=8bTWdELA7Zo

WARNING: unable to download video info webpage: HTTP Error 429: unknown
WARNING: unable to download video info webpage: HTTP Error 429: unknown
WARNING: unable to download video info webpage: HTTP Error 429: unknown
WARNING: unable to download video info webpage: HTTP Error 429: unknown
ERROR: 8bTWdELA7Zo: YouTube said: This video is unavailable.
(如果是普通视频,会生成视频流和音频流的链接)

尝试streamlink导入部分cookies提取直播m3u8, 依旧报错:

streamlink --http-header "User-Agent=Mozilla/5.0" --http-cookie "GOOGLE_ABUSE_EXEMPTION=ID=833f06b5cdc9b294:TM=1563890173:C=r:IP=0.0.0.0-:S=APGng0tZK4xtlM3zA_0KcKUWXZixWEyvCA" --stream-url https://www.youtube.com/watch?v=ll_VCa61PdE

error: Unable to open URL: https://youtube.com/get_video_info (429 Client Error: unknown for url: https://youtube.com/get_video_info?el=detailpage&video_id=ll_VCa61PdE)

浏览器打开
https://youtube.com/get_video_info?el=detailpage&video_id=ll_VCa61PdE
提示信息:
github1

束手无策,希望能有解决方案。(如果IP被ban是永久的话)
(另外,record_youtube.sh中未发现 $M3U8_URL 变量来自哪里,bug?)

更新:

Firefox 无法播放问题解决,除ffmpeg外需安装ffmpeg-libs (RPMFusion源较新),并重启。
IP Ban 非永久,大概12小时解除。

@John-Smith-SG
Copy link
Author

问题初步解决,写了个python脚本,导入登陆后的cookies,UA等信息,抓取html,判断“LIVE NOW”文本是否存在,存在则调用record_streamlink.sh (once模式),如此既可循环运行又可减少请求视频源次数,不会被ban。

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

No branches or pull requests

1 participant