GithubHelp home page GithubHelp logo

ohmybahgosh / yt-dlp-scripts Goto Github PK

View Code? Open in Web Editor NEW
114.0 7.0 22.0 73 KB

...Just a place for me to share my various YT-DLP & related bash scripts.

License: GNU General Public License v3.0

Shell 100.00%
yt-dlp youtube-dl bash bash-script shell-script downloading scraper parser ffmpeg ffmpeg-script

yt-dlp-scripts's Introduction

Welcome to YT-DLP-SCRIPTS ๐Ÿ‘‹

What is This?

My Own Random Collection of BASH Scripts That Focus on Automatting Bulk Downloading of Content via YT-DLP



Downloading This Repo:

git clone https://github.com/ohmybahgosh/YT-DLP-SCRIPTS.git



Author

๐Ÿ‘ค OhMyBahGosh

๐Ÿค Issue, Question, or Requests?

Feel free to check issues page.

Show your support

Give a โญ๏ธ if this project helped you!

๐Ÿ“ License

Copyright ยฉ 2021 OhMyBahGosh.
This project is GNU GPL licensed.

yt-dlp-scripts's People

Contributors

ohmybahgosh avatar oscillatingwinter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

yt-dlp-scripts's Issues

0 Episodes Found

Hi, I see the last commit was to fix the 0 episodes found bug, but I'm still getting that. Full disclosure that I am a newbie to this, but would be grateful if you had any ideas!

MTV-YTDLP: Usage on other sites (nickjr), subtitles, & metadata

Nickjr
This script also works at http://www.nickjr.com However, given that episodes at nickjr tend to be multi-episodes in one, I ran into a issue with the current script when it creates directories as nickjr uses / in the file name a lot to separate the episodes.

I made the following modification, though not sure it's the most efficient:

EPISODE_TITLE=$(cat MTV_JSON/MTV.json | jq -r --slurp 'first(.[].playlist_title)')

EPISODE_TITLE=$(cat MTV_JSON/MTV.json | jq -r --slurp 'first(.[].playlist_title)' | sed -e 's/\// - /g')

Subtitles & Metadata
It's commented out, but I was using a similar command to what you have here to get subtitles and metadata.

#yt-dlp -f 'bv+ba/b' --downloader-args aria2c:"-x 16" --convert-subtitles=srt --add-metadata --write-all-thumbnails --embed-thumbnail -N45 --embed-subs

Doing this I had issues with getting ffmpeg to bring in that information. I was able to find a solution for subtitles, but have not had any luck with keeping metadata yet, not sure if you know a way for that. I updated the below which works for the subtitles:

ffmpeg -f concat -i inputs.txt -c copy "${FINAL_MERGED_FILENAME}"
ffmpeg -f concat -i inputs.txt -c copy -scodec copy "${FINAL_MERGED_FILENAME}"

Other
You mentioned it on the other issue, but if you wanted to look into a script to pull all the episodes from nickjr for a series that would be amazing. There show list as an example http://www.nickjr.com/paw-patrol/ contains a lot of videos and not all of them are episodes. The episodes seem to have a tag on them as Full Episode or contain that in the URL.

I wasn't sure how you wanted to handle the changes whether updating on MTV-YTDLP, creating a separate site specific script, just having my notes in the event it helps someone else, etc., so I did not PR.

Comedy Central Bulk extractor

Would you be able to modify the mtv extractor to work on Comedy central. You don't need a cookie file, but it does download in segments like mtv and it needs to be merged.

Discovery+ Functional?

Hello,
I hate to be the person to ask. Is the Discovery+ script still functional? It looks promising but I haven't seen new activity. I wouldn't wanna sub then it doesn't work.

Please delete or close if not appropriate to ask here.

Login

Do i hv to login to my account for this?
Disney+

Discovery Plus Issues

HI. I have my cookies and all setup, but i am getting

ERROR: [DiscoveryPlus] diners-drive-ins-and-dives/you-can-say-that-again: Unable to download JSON metadata: HTTP Error 404: Not Found (caused by <HTTPError 404: 'Not Found'>); please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U

403 Forbidden

I keep getting 403 forbidden messages after the tool finds episodes and starts the download process. Lots of messages indicating it's unable to get fragment one.

Using the exported Cookies from EditThisCookie (in netscape format) and placing them in a txt file doesn't work at all (Unable to find seasons/episodes). The only way I've been able to get the cookies to work is with another extension "get cookies.txt", which allows the tool to find the seasons and episodes. However, all my requests get 403'd.

Any ideas why it's getting stuck at that point? Is there another way to add the cookies I'm not aware of? The page says to include all sub-domains with the cookies, and I don't know how to actually do that.....

Thanks in advance.

OUTPUTDIR folder name needs two digits

Not really sure how to say this in your proper terms, but here goes...

First, the Discovery Plus script works like a dream! Loving it, Thanks!

One thing that kinda "bugs" me tho, is the output folder for the season uses only one digit instead of two.

Example:
x:\TvShow1\Season 1
vs
x:\TvShow2\Season 01
(screenshot attached)
sshot-1

Not really a big deal at all and certainly not a bug, just an annoyance since shows that have more that 10 seasons will be listed in the wrong order in some programs like for example Windows Explorer.

Thanks again for your time and efforts!!! And sorry if I did this wrong...
-B

Discovery plus unable to find some episode URLS.

Similar to #24, I am running into some issues getting these scripts to parse some shows, but not others. For example, these work:

These ones do not:

Any thoughts?

Discovery plus unable to find episode URLS.

So I have tried with both versions of the discovery plus scripts as-well as with several different show, but each time I try to get the episodes the script return"0 episodes found". It is able to tell me the exact count of all seasons but can't find any episode urls. I have used this script for a while without issue, I reinstalled Sed and Jq to no avail. Here is one of the links I tried to download.
https://www.discoveryplus.com/show/dirty-jobs
Any help is greatly appreciated.

PARAMOUNT-V2-YTDLP: Input URLs not including all Episodes

Hello. First thank you for taking the time to develop and share these scrips.

I've noticed that for shows where there are multiple seasons, with more than one season having greater than 18 episodes, it seems that the generation of the input_urls is incomplete. From my testing, it seems that the input_urls does not capture anything after episode 18 for any of the seasons.

Below are two examples where I've noticed this. I've also attached the input_urls file that was created.
https://www.paramountplus.com/shows/blue_bloods/
https://www.paramountplus.com/shows/hawaii_five_0/

blue_bloods_INPUT_URLS.txt
hawaii_five_0_INPUT_URLS.txt

I did not realize I was missing these until referencing back to thetvdb.com and noticing some seasons had more episodes then I was seeing in the text file. This is also because I noticed that depending on how you select the individual season and 'show more' button from the paramount website it may also only show up to 18 episodes for certain seaons despite there being more if you went directly to that season page and then selected 'show more'.

Let me know if any other information would be helpful.

What can i edit to make this work in Canada?

The URLs all have /ca/ after the discoveryplus.com. It finds both seasons of this show:

https://www.discoveryplus.com/ca/show/90-day-the-single-life-discovery-originals-ca

But doesn't find any episodes.

So far, i have modified:

x-disco-client to WEB:UNKNOWN:dplus_us:1.25.0
x-disco-params to realm=go,siteLookupKey=dplus_ca,bid=dplus,hn=www.discoveryplus.com,hth=ca,features=ar
x-accept-language to en-CA,en;q=0.9,fr-CA;q=0.8,fr;q=0.7,en-GB;q=0.6,en-US;q=0.5
and i have modified https://www.discoveryplus.com/video/#g to https://www.discoveryplus.com/ca/video/#g

But it still finds 2 seasons and 0 episodes.

I have a feeling the culprit is this line:

curl -s "https://us1-prod-direct.discoveryplus.com/cms/collections/89438300356657080631189351362572714453?include=default&decorators=viewingHistory,isFavorite,playbackAllowed&pf\[seasonNumber\]=${SEASON_NUMBER}&pf\[show.id\]=${SHOW_ID}" \

I don't know where to get that collections number... All i could find that resembles this URL in the headers is:

https://us1-prod-direct.discoveryplus.com/cms/routes/show/90-day-the-single-life-discovery-originals-ca?include=default&decorators=viewingHistory,isFavorite,playbackAllowed

I have tried changing that number to an other ID i found in one of the responses and i get the exact same result so i that is why i think the collections URL is the problem.

How can i get that URL from my Chrome Dev Tools?

files showing up as 8.3 versions

I run the script on a debian 10 box and did a dump of Halloween baking championship, but then when I connect to the folder via samba and look at the files via directory opus the files are showing up in 8.3 file name format.

Untitled

Where do you enter the URL?

Ok I uncommented the cookie and put where it goes but I have no idea where exactly I enter the URL?

Do I erase the ex. evil URL and put my own?

Does Paramount Plus script still work?

Hello-

I am attempting to use the Paramount Plus V2 script and am running into these errors when the actual download tries to happen:

ERROR: [ParamountPlus] y9yZ5nT_4MqX23ktY8j8mS20MWkQzpFm: This video is DRM protected

Seems like it's probably a yt-dlp issue, but I wanted to check here if anyone has been able to use these scripts recently? I am attempting to get this show: https://www.paramountplus.com/shows/team-umizoomi/.

DISCOVERY-PLUS-YTDLP: "jq_util_inputs_next_input_cb" failed

I downloaded JQ win64 .exe from here: https://github.com/stedolan/jq/releases/tag/jq-1.6 and put it in my cygwin64 path just like I did for aria2. I also installed all the cygwin jq packages just in case (along with sed).

After inputting the show URL and cookies, I get this for selecting seasons:

jq_util_inputs_next_input_cb failed

Then 0 episodes show up:

0 episodes found

Not sure if something was changed with discovery where the script is broken or I'm doing something wrong, but the input URLs come up empty. Any help is appreciated!

Issue in EU

Hello,

I am in the EU and trying to get this script working, I have changed the curl URL's from us1 to eu1 which does some progress by finding the amount of seasons in that show, but still no episodes. I have to use the /it/ suffix on yt-dlp

GRAB FIRST DUMP OF JSON SO WE CAN SET THE SHOW_ID VARIABLE

SHOW_JSON_FIRST=$(
curl -s "https://eu1-prod-direct.discoveryplus.com/cms/routes/show/${URL_SLUG}?include=default&decorators=viewingHistory,isFavorite,playbackAllowed"
-H 'authority: eu1-prod-direct.discoveryplus.com'
-H 'x-disco-client: WEB:UNKNOWN:dplus_us:1.8.0'
-H 'x-disco-params: realm=go,siteLookupKey=dplus_us,features=ar'
-H 'accept: /'
-H 'accept-language: en-us,en;q=0.9'
--cookie "${COOKIE_FILE}"
)

USING THE SHOW_JSON_FIRST DUMP, WE CAN EXTRACT THE SHOW_ID & SHOW_SEASON_COUNT

SHOW_ID=$(echo "$SHOW_JSON_FIRST" | jq -r '.included[].attributes.component.mandatoryParams' | grep -Eo '^pf.$' | head -n1 | sed -e 's#pf[show.id]=##' | sed -e 's/&.$//g')
SHOW_SEASON_COUNT=$(echo "$SHOW_JSON_FIRST" | jq -r '.included[]? | .attributes.component.filters | values' | grep -Eo 'pf[seasonNumber].*$' | sed -e 's#pf[seasonNumber]=##g' -e 's#",##g')

NOW WE'LL LOOP THRU EACH SEASON TO GRAB ALL EPISODE URLS AND PUT THEM IN INPUT_URLS.txt

for SEASON_NUMBER in $(echo "$SHOW_SEASON_COUNT"); do
curl -s "https://eu1-prod-direct.discoveryplus.com/cms/collections/89438300356657080631189351362572714453?include=default&decorators=viewingHistory,isFavorite,playbackAllowed&pf\[seasonNumber\]=${SEASON_NUMBER}&pf\[show.id\]=${SHOW_ID}"
-H 'authority: eu1-prod-direct.discoveryplus.com'
-H 'x-disco-client: WEB:UNKNOWN:dplus_us:prod'
-H 'x-disco-params: realm=go,siteLookupKey=dplus_us,features=ar'
-H 'referer: https://www.discoveryplus.com/it/'
-H 'accept-language: en'
--cookie "${COOKIE_FILE}" | jq -r '.included[]? | .attributes | .path' | sed -e 's#null##g' -e '/^$/d' | sed -e 's#^#https://www.discoveryplus.com/it/video/#g' >> "$EPISODE_URL_LIST"
done

download single season?

Love this script!
Would be great if one could dl just one single season (or even episode) rather than the whole series.

think i might have to learn some bash so i can contribute some of these things myself! lol

thanks again OMBG!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.