Closed BeeMuffins closed 2 years ago
Greatly appreciate getting feedback on these scripts!
I'll dig in tomorrow morning, as I've been meaning to fix filename issues for both this script and the paramount script. I'm gonna build in some more checks as well, that'll identify the examples you posted.
As for the NickJr, I'll make it as it's own script, as my next project is to merge all these scripts in to one central menu driven script :)
Great stuff. I like really like the idea of a menu driven script, so many different possibilities with that.
So I spent some time yesterday scraping some stuff for work, and while writing a loop I realized I didn't try xidel on the MTV script.. MTV's site has all the metadata in the html source code.. So I'll map those out to variables, and then I should be able to push those metadata variables in to the final merged episode file...I'll get something pushed out later today!
<meta name="generator" content=
"HTML Tidy for HTML5 for Linux version 5.6.0">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="preload" href="/vendor-0fb23c50.js" as="script">
<link rel="preload" href="/runtime-33bfb188.js" as="script">
<link rel="preload" href="/gae-f003f1eb.js" as="script">
<title data-rh="true">True Life Crime - Season 2, Ep. 8 - Double
Cross or Deadly Deal? - Full Episode | MTV</title>
<meta data-rh="true" name="app_version" content=
"5b1822fc8-4806-2021-08-19">
<meta data-rh="true" name="robots" content="noydir,noodp">
<meta data-rh="true" name="viewport" content=
"width=device-width, initial-scale=1, user-scalable=1, maximum-scale=2">
<meta data-rh="true" name="theme-color" content="#87b6c0">
<meta data-rh="true" name="msapplication-config" content=
"/browserconfig.xml">
<meta data-rh="true" name="description" content=
"Dometi Pongo reports on Michigan detectives' efforts to identify a dismembered body and, with the help of cryptic text messages and surveillance footage, bring the killer to justice.">
<meta data-rh="true" name="original-source" content=
"https://www.mtv.com/episodes/nklzvl/true-life-crime-double-cross-or-deadly-deal-season-2-ep-8">
<meta data-rh="true" name="video:duration" content="2488">
<meta data-rh="true" name="video:release_date" content=
"2021-08-18T01:00:00.000Z">
<meta data-rh="true" name="video:series" content="True Life Crime">
<meta data-rh="true" property="search:title" content=
"Double Cross or Deadly Deal?">
<meta data-rh="true" property="search:description" content=
"Dometi Pongo reports on Michigan detectives' efforts to identify a dismembered body and, with the help of cryptic text messages and surveillance footage, bring the killer to justice.">
<meta data-rh="true" property="search:imageUrl" content=
"https://mtv.mtvnimages.com/uri/mgid:arc:content:mtv.com:f4d99681-11fd-4ed9-93c8-e847f5221078?quality=0.7">
<meta data-rh="true" property="search:imageHeight" content="1080">
<meta data-rh="true" property="search:imageWidth" content="1920">
<meta data-rh="true" property="search:imageRatio" content="16:9">
<meta data-rh="true" property="search:url" content=
"/episodes/nklzvl/true-life-crime-double-cross-or-deadly-deal-season-2-ep-8">
<meta data-rh="true" property="search:contentType" content=
"Episode">
<meta data-rh="true" property="search:parentId" content=
"mgid:arc:series:mtv.com:05189d0e-1d71-11ea-9fb2-70df2f866ace">
<meta data-rh="true" property="search:seasonNumber" content="2">
<meta data-rh="true" property="search:episodeNumber" content="8">
<meta data-rh="true" property="search:episodeTitle" content=
"Double Cross or Deadly Deal?">
<meta data-rh="true" property="search:duration" content="41:28">
<meta data-rh="true" property="search:parentTitle" content=
"True Life Crime">
<meta data-rh="true" property="search:bucketName" content=
"Episode">
<meta data-rh="true" property="search:labelName" content="Episode">
<meta data-rh="true" property="search:contentDate" content=
"2021-08-18T01:00:00.000Z">
<meta data-rh="true" property="search:isTveAuthRequiredForDesktop"
content="true">
<meta data-rh="true" property="search:isTveAuthRequiredForMobile"
content="true">
<meta data-rh="true" property="og:site_name" content="MTV">
<meta data-rh="true" property="og:image:type" content="image/jpeg">
<meta data-rh="true" property="og:image:width" content="640">
<meta data-rh="true" property="og:image:height" content="360">
<meta data-rh="true" property="og:description" content=
"Dometi Pongo reports on Michigan detectives' efforts to identify a dismembered body and, with the help of cryptic text messages and surveillance footage, bring the killer to justice.">
<meta data-rh="true" property="og:title" content=
"True Life Crime - Double Cross or Deadly Deal? | MTV">
<meta data-rh="true" property="og:image" content=
"https://mtv.mtvnimages.com/uri/mgid:arc:content:mtv.com:f4d99681-11fd-4ed9-93c8-e847f5221078?quality=0.7">
<meta data-rh="true" property="og:url" content=
"https://www.mtv.com/episodes/nklzvl/true-life-crime-double-cross-or-deadly-deal-season-2-ep-8">
<meta data-rh="true" property="og:type" content="episode">
<meta data-rh="true" property="og:video:series" content=
"True Life Crime">
<meta data-rh="true" property="og:video:release_date" content=
"2021-08-18T01:00:00.000Z">
<meta data-rh="true" property="og:video:duration" content="2488">
<meta data-rh="true" property="og:video:tag" content=
"Dismemberment,Michigan,Criminal evidence,drugs - disambiguation,Prison,Money,Interrogations,Self-defense,Security cameras,Shopping Spree,Stereo,Criminal justice">
<meta data-rh="true" name="twitter:card" content=
"summary_large_image">
<meta data-rh="true" name="twitter:description" content=
"Dometi Pongo reports on Michigan detectives' efforts to identify a dismembered body and, with the help of cryptic text messages and surveillance footage, bring the killer to justice.">
<meta data-rh="true" name="twitter:title" content=
"True Life Crime - Double Cross or Deadly Deal? | MTV">
<meta data-rh="true" name="twitter:image" content=
"https://mtv.mtvnimages.com/uri/mgid:arc:content:mtv.com:f4d99681-11fd-4ed9-93c8-e847f5221078?quality=0.7">
This is on the top of my to-do list! I have the xpaths scripted via xidel to grab the metadata, just gotta clean up the formatting a bit so that ffmpeg can embed the metadata to the final output!
Feel free to re-open this if this is still active
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: https://github.com/ohmybahgosh/YT-DLP-SCRIPTS/blob/fc24e0d6f7b8498ba51312bf11829dc9ad3077eb/MTV-YTDLP/MTV-YTDLP#L56
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. https://github.com/ohmybahgosh/YT-DLP-SCRIPTS/blob/fc24e0d6f7b8498ba51312bf11829dc9ad3077eb/MTV-YTDLP/MTV-YTDLP#L63
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: https://github.com/ohmybahgosh/YT-DLP-SCRIPTS/blob/fc24e0d6f7b8498ba51312bf11829dc9ad3077eb/MTV-YTDLP/MTV-YTDLP#L73ffmpeg -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.