question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Don't Download Shorts when Downloading YouTube Channels/Playlists

See original GitHub issue

Checklist

Region

No response

Example URLs

https://www.youtube.com/user/Vsauce2/videos

Description

When I try to download a youtube channel it downloads the shorts and the full-length videos. I would like an option to only download full-length videos and not shorts; for example, when I download VSauce2 it will download “The Pi Alphabet Clock #shorts” when I would like to not download any YouTube Shorts content. I hope this is clear enough.

Verbose log

-dlp -vU https://www.youtube.com/user/Vsauce2/videos
[debug] Command-line config: ['-vU', 'https://www.youtube.com/user/Vsauce2/videos']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, err utf-8, pref cp1252
[debug] yt-dlp version 2022.03.08.2 [e491d06d3]
[debug] Python version 3.10.2 (CPython 64bit) - Windows-10-10.0.19043-SP0
[debug] exe versions: ffmpeg 2022-03-03-git-72684d2c2d-full_build-www.gyan.dev (setts), ffprobe 2022-03-03-git-72684d2c2d-full_build-www.gyan.dev
[debug] Optional libraries: brotli, Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
Latest version: 2022.03.08.1, Current version: 2022.03.08.2
yt-dlp is up to date (2022.03.08.2)
[debug] [youtube:tab] Extracting URL: https://www.youtube.com/user/Vsauce2/videos
[youtube:tab] Vsauce2: Downloading webpage
[debug] [youtube:tab] Final URL: https://www.youtube.com/user/Vsauce2/videos
[download] Downloading playlist: Vsauce2 - Videos
[youtube:tab] UCqmugCqELzhIMNYnsjScXXw page 1: Downloading API JSON
[youtube:tab] UCqmugCqELzhIMNYnsjScXXw page 2: Downloading API JSON
[youtube:tab] UCqmugCqELzhIMNYnsjScXXw page 3: Downloading API JSON
[youtube:tab] UCqmugCqELzhIMNYnsjScXXw page 4: Downloading API JSON
[youtube:tab] UCqmugCqELzhIMNYnsjScXXw page 5: Downloading API JSON
[youtube:tab] UCqmugCqELzhIMNYnsjScXXw page 6: Downloading API JSON
[youtube:tab] UCqmugCqELzhIMNYnsjScXXw page 7: Downloading API JSON
[youtube:tab] UCqmugCqELzhIMNYnsjScXXw page 8: Downloading API JSON
[youtube:tab] UCqmugCqELzhIMNYnsjScXXw page 9: Downloading API JSON
[youtube:tab] UCqmugCqELzhIMNYnsjScXXw page 10: Downloading API JSON
[youtube:tab] UCqmugCqELzhIMNYnsjScXXw page 11: Downloading API JSON
[youtube:tab] UCqmugCqELzhIMNYnsjScXXw page 12: Downloading API JSON
[youtube:tab] UCqmugCqELzhIMNYnsjScXXw page 13: Downloading API JSON
[youtube:tab] UCqmugCqELzhIMNYnsjScXXw page 14: Downloading API JSON
[youtube:tab] playlist Vsauce2 - Videos: Downloading 423 videos
[download] Downloading video 1 of 423
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=PvPI7yxvRyY
[youtube] PvPI7yxvRyY: Downloading webpage
[youtube] PvPI7yxvRyY: Downloading android player API JSON
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, codec:vp9.2, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), acodec, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] PvPI7yxvRyY: Downloading 1 format(s): 247+251
[debug] Invoking downloader on "https://rr3---sn-q4fl6nsy.googlevideo.com/videoplayback?expire=1648021727&ei=f3w6Yr-HD6qjir4Pp8WCoAg&ip=68.0.49.129&id=o-ADfsp0pev-CI-bbcW2a_p3wPGH5P6zSYpwEFQgjX9gZc&itag=247&source=youtube&requiressl=yes&mh=eT&mm=31%2C29&mn=sn-q4fl6nsy%2Csn-q4flrnsk&ms=au%2Crdu&mv=m&mvi=3&pl=20&initcwndbps=1621250&vprv=1&mime=video%2Fwebm&gir=yes&clen=3069368&dur=40.208&lmt=1647286483139405&mt=1647999654&fvip=1&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5437434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIgVpJC1XJEkp-LNMPV6DNtm9Bski2AXYgwSQ6LAf0L4DwCIQC-JPHwnlmm1o2nIF1leqtmGqCf3mlYISKgp0T5uODe_w%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAORFVz4NoH96QV3iFd-W4H2rCCZ4HVl5siM2AeQ3LoXVAiEAkL4QGivIF4oPrN2XOp5GIdVLyvXRm_LT-n0rkRPja94%3D"
[download] Destination: The Pi Alphabet Clock #shorts [PvPI7yxvRyY].f247.webm
[download] 100% of 2.93MiB in 00:00
[debug] Invoking downloader on "https://rr3---sn-q4fl6nsy.googlevideo.com/videoplayback?expire=1648021727&ei=f3w6Yr-HD6qjir4Pp8WCoAg&ip=68.0.49.129&id=o-ADfsp0pev-CI-bbcW2a_p3wPGH5P6zSYpwEFQgjX9gZc&itag=251&source=youtube&requiressl=yes&mh=eT&mm=31%2C29&mn=sn-q4fl6nsy%2Csn-q4flrnsk&ms=au%2Crdu&mv=m&mvi=3&pl=20&initcwndbps=1621250&vprv=1&mime=audio%2Fwebm&gir=yes&clen=554972&dur=40.241&lmt=1647285440943924&mt=1647999654&fvip=1&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5432434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAKzsIO3Sg9scskKhGsFGuc9V3tQDm9NtrNkvPBVq6FJ-AiEApWQoNuUQ41NEjkRNGgilNDFHAvkBuNhVJYSzAuTLZxU%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAORFVz4NoH96QV3iFd-W4H2rCCZ4HVl5siM2AeQ3LoXVAiEAkL4QGivIF4oPrN2XOp5GIdVLyvXRm_LT-n0rkRPja94%3D"
[download] Destination: The Pi Alphabet Clock #shorts [PvPI7yxvRyY].f251.webm
[download] 100% of 541.96KiB in 00:00
[Merger] Merging formats into "The Pi Alphabet Clock #shorts [PvPI7yxvRyY].webm"
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:The Pi Alphabet Clock #shorts [PvPI7yxvRyY].f247.webm" -i "file:The Pi Alphabet Clock #shorts [PvPI7yxvRyY].f251.webm" -c copy -map "0:v:0" -map "1:a:0" -movflags "+faststart" "file:The Pi Alphabet Clock #shorts [PvPI7yxvRyY].temp.webm"
Deleting original file The Pi Alphabet Clock #shorts [PvPI7yxvRyY].f251.webm (pass -k to keep)
Deleting original file The Pi Alphabet Clock #shorts [PvPI7yxvRyY].f247.webm (pass -k to keep)
[download] Downloading video 2 of 423
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=ofneDHUlhM0
[youtube] ofneDHUlhM0: Downloading webpage
[youtube] ofneDHUlhM0: Downloading android player API JSON
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, codec:vp9.2, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), acodec, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id

ERROR: Interrupted by user

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
coletdjnzcommented, Apr 7, 2022

f.y.i. youtube now redirects /shorts/ by itself with HTTP 303 back to /watch?v= at least at UK (started at April 5th 2022). https://www.youtube.com/shorts/mNj-f7CW5AM

Seeing this too. I’m assuming they are still test/rolling it out.

However for yt-dlp, as long as YouTube provides the /shorts/ link or shorts overlay (even if it redirects to /watch) then this filter should still work

1reaction
coletdjnzcommented, Mar 27, 2022

With https://github.com/yt-dlp/yt-dlp/commit/fd2ad7cb245423e49db1be9d9654c7dd3103619a you should be able to do

--match-filter "original_url!*=/shorts/ & url!*=/shorts/" to filter out shorts

Note this only works in places where youtube shows the shorts thumbnail overlay, or if the link on the webpage directs you to the shorts viewer.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Download YouTube Videos, Playlist, Shorts, and ...
How to Download A YouTube Video, YouTube Shorts, YouTube Playlists or Music from YouTube completely legally without external websites.
Read more >
How To Download YouTube Shorts
Download YouTube shorts on desktop or download youtube shorts on mobile to upload on tiktok, instagram reels or other platforms.
Read more >
Download videos you've uploaded with YouTube Studio
You can download MP4 files of videos that you've uploaded to YouTube in either or 720p or 360p, depending on the video size....
Read more >
How to Download YouTube Video to Mobile - YouTube
Below each video, there is a download option which you simply press ... and store them in your YouTube library under the downloads...
Read more >
How To Download A Video From YouTube (Legally)
YouTube makes sharing your own videos or other people's videos extremely easy however has YouTube has certain rules for downloading videos ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found