5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

youtube-dlでHTTP Error 429: Too Many Requests (caused by <HTTPError 429: 'Too Many Requests'>)が出たときの対処法

Last updated at Posted at 2019-10-07

エラーが出た経緯

私は、自分のDiscord botに音楽機能をつけており、それで音楽を聞いていると...

[stderr] ERROR: Unable to download webpage: HTTP Error 429: Too Many Requests (caused by <HTTPError 429: 'Too Many Requests'>); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

と言うエラーが発生しました。
つまり、YouTube上の動画のダウンロードしすぎということです。

試行錯誤

エラーを調べてみると、https://github.com/ytdl-org/youtube-dl/issues/5138
このissuesがヒットしました。しかし、解決法は見つかりませんでした。
次に、https://github.com/ytdl-org/youtube-dl#http-error-429-too-many-requests-or-402-payment-required
これを発見しました。どうやらIPアドレスでブロックされているようです。
これを解除するにはYouTubeに連絡するか、ホワイトリストに登録されているIPアドレスを使う必要があるようです...
ん?IPアドレスでブロック...?

解決方法

はい、というわけで解決方法です。
IPアドレスでブロックされているということは、IPアドレスを変えればいいということです。
昔、どこかで「再起動するたびにIPが変わってしまい、IPが固定でないといけないサービスはできない」と書いてあるページを見たのを思い出しました。
ということで、ダッシュボードのMoreからRestart all dynosで再起動しました。
すると...IPが無事変わり、ダウンロードできるようになりました。
家のネット回線で使っている場合は、ルーター再起動でできると思います(未検証)
固定IPを使っている場合は...変えないと無理ですね。
Nuro光みたいに半固定IPだとどうなんでしょうか。

5
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?