--- title: youtube-dl published: true private: false date: '23:39 18-03-2018' taxonomy: category: - blog tag: - tips - youtube-dl twig_first: false hero_classes: text-dark blog_url: /blog show_sidebar: true show_breadcrumbs: true show_pagination: true continue_link: true feed: limit: 10 content: items: '- ''@self.children''' limit: '5' order: by: date dir: desc pagination: '1' url_taxonomy_filters: '1' creator: erreur32 textformatter: false --- **Youtube-dl Fix Too Many Requests avec youtube-dl** > Corriger l'erreur HTTP Error 429 > > Too Many Requests avec youtube-dl

HTTP Error 429

Too Many Requests avec youtube-dl.

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

Il suffit simplement de de rajouter l'option --force-ipv4 dans votre commande !

$ youtube-dl  -o "%(title)s.%(ext)s" --force-ipv4 

 

Ensuite on rajoute un alias pour ce simplifié la life, on rajoute dans  .bashrc :

$ alias ytdl='youtube-dl  -o "%(title)s.%(ext)s" --extract-audio --audio-format mp3 -k --force-ipv4 $1'
$ alias ytdlV='youtube-dl  -o "%(title)s.%(ext)s" --force-ipv4 $1'

La première ligne download et garde la vidèo et le mp3

La seconde ligne download et garde que la vidéo.

```bash $ youtube-dl https://www.youtube.com/watch?v=7Uexuyy_HL8 [youtube] 7Uexuyy_HL8: Downloading webpage [youtube] 7Uexuyy_HL8: Downloading video info webpage [youtube] 7Uexuyy_HL8: Extracting video information< [download] Destination: Stupeflip - The Antidote.f248.webm [download] 100% of 1.50MiB in 00:00 [download] Destination: Stupeflip - The Antidote.f251.webm [download] 100% of 3.24MiB in 00:00 [ffmpeg] Merging formats into "Stupeflip - The Antidote.webm" Deleting original file Stupeflip - The Antidote.f248.webm (pass -k to keep) Deleting original file Stupeflip - The Antidote.f251.webm (pass -k to keep) ``` # tips youtube-dl debian Special pour OVH rajoutez **--force-ipv4 ** ou **-4** ## Update before use: youtube-dl -U, --update # Video alias ytdl='youtube-dl --force-ipv4 -i $1' alias ytdlvid='cd /home/media/Youtube && youtube-dl -4 -o "%(title)s.%(ext)s" -i $1' # MP3 alias ytdlmp32="youtube-dl -4 --extract-audio --audio-format best --audio-quality 0 -i $1" alias ytdlmp3='cd /home/media/YoutubeMP3/ && youtube-dl -o "%(title)s.%(ext)s" --audio-format best --force-ipv4 -x -i $1' #youtube-dl -4 --extract-audio --audio-format mp3 ```bash Options: General Options: -h, --help Print this help text and exit --version Print program version and exit -U, --update Update this program to latest version. Make sure that you have sufficient permissions (run with sudo if needed) -i, --ignore-errors Continue on download errors, for example to skip unavailable videos in a playlist --abort-on-error Abort downloading of further videos (in the playlist or the command line) if an error occurs --dump-user-agent Display the current browser identification --list-extractors List all supported extractors --extractor-descriptions Output descriptions of all supported extractors --force-generic-extractor Force extraction to use the generic extractor --default-search PREFIX Use this prefix for unqualified URLs. For example "gvsearch2:" downloads two videos from google videos for youtube-dl "large apple". Use the value "auto" to let youtube-dl guess ("auto_warning" to emit a warning when guessing). "error" just throws an error. The default value "fixup_error" repairs broken URLs, but emits an error if this is not possible instead of searching. --ignore-config Do not read configuration files. When given in the global configuration file /etc/youtube-dl.conf: Do not read the user configuration in ~/.config/youtube- dl/config (%APPDATA%/youtube-dl/config.txt on Windows) --config-location PATH Location of the configuration file; either the path to the config or its containing directory. --flat-playlist Do not extract the videos of a playlist, only list them. --mark-watched Mark videos watched (YouTube only) --no-mark-watched Do not mark videos watched (YouTube only) --no-color Do not emit color codes in output Network Options: --proxy URL Use the specified HTTP/HTTPS/SOCKS proxy. To enable SOCKS proxy, specify a proper scheme. For example socks5://127.0.0.1:1080/. Pass in an empty string (--proxy "") for direct connection --socket-timeout SECONDS Time to wait before giving up, in seconds --source-address IP Client-side IP address to bind to -4, --force-ipv4 Make all connections via IPv4 -6, --force-ipv6 Make all connections via IPv6 Geo Restriction: --geo-verification-proxy URL Use this proxy to verify the IP address for some geo-restricted sites. The default proxy specified by --proxy (or none, if the option is not present) is used for the actual downloading. --geo-bypass Bypass geographic restriction via faking X-Forwarded-For HTTP header --no-geo-bypass Do not bypass geographic restriction via faking X-Forwarded-For HTTP header --geo-bypass-country CODE Force bypass geographic restriction with explicitly provided two-letter ISO 3166-2 country code --geo-bypass-ip-block IP_BLOCK Force bypass geographic restriction with explicitly provided IP block in CIDR notation Video Selection: --playlist-start NUMBER Playlist video to start at (default is 1) --playlist-end NUMBER Playlist video to end at (default is last) --playlist-items ITEM_SPEC Playlist video items to download. Specify indices of the videos in the playlist separated by commas like: "--playlist-items 1,2,5,8" if you want to download videos indexed 1, 2, 5, 8 in the playlist. You can specify range: "--playlist-items 1-3,7,10-13", it will download the videos at index 1, 2, 3, 7, 10, 11, 12 and 13. --match-title REGEX Download only matching titles (regex or caseless sub-string) --reject-title REGEX Skip download for matching titles (regex or caseless sub-string) --max-downloads NUMBER Abort after downloading NUMBER files --min-filesize SIZE Do not download any videos smaller than SIZE (e.g. 50k or 44.6m) --max-filesize SIZE Do not download any videos larger than SIZE (e.g. 50k or 44.6m) --date DATE Download only videos uploaded in this date --datebefore DATE Download only videos uploaded on or before this date (i.e. inclusive) --dateafter DATE Download only videos uploaded on or after this date (i.e. inclusive) --min-views COUNT Do not download any videos with less than COUNT views --max-views COUNT Do not download any videos with more than COUNT views --match-filter FILTER Generic video filter. Specify any key (see the "OUTPUT TEMPLATE" for a list of available keys) to match if the key is present, !key to check if the key is not present, key > NUMBER (like "comment_count > 12", also works with >=, <, <=, !=, =) to compare against a number, key = 'LITERAL' (like "uploader = 'Mike Smith'", also works with !=) to match against a string literal and & to require multiple matches. Values which are not known are excluded unless you put a question mark (?) after the operator. For example, to only match videos that have been liked more than 100 times and disliked less than 50 times (or the dislike functionality is not available at the given service), but who also have a description, use --match-filter "like_count > 100 & dislike_count .+?) - (?P.+)" --xattrs Write metadata to the video file's xattrs (using dublin core and xdg standards) --fixup POLICY Automatically correct known faults of the file. One of never (do nothing), warn (only emit a warning), detect_or_warn (the default; fix file if we can, warn otherwise) --prefer-avconv Prefer avconv over ffmpeg for running the postprocessors --prefer-ffmpeg Prefer ffmpeg over avconv for running the postprocessors (default) --ffmpeg-location PATH Location of the ffmpeg/avconv binary; either the path to the binary or its containing directory. --exec CMD Execute a command on the file after downloading, similar to find's -exec syntax. Example: --exec 'adb push {} /sdcard/Music/ && rm {}' --convert-subs FORMAT Convert the subtitles to other format (currently supported: srt|ass|vtt|lrc) ``` Happy Download ! by 🅴🆁🆁🅴🆄🆁32