Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[forteller] Adds a forteller extractor #1

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

Conversation

captn3m0
Copy link
Owner

@captn3m0 captn3m0 commented Apr 6, 2023

This is in draft, while I work on this. Suggested invocation:

yt-dlp --embed-metadata --lazy-playlist  https://www.fortellergames.com/narrations/cephalofair/jaws-of-the-lion  -o "%(disc_number)02d - %(chapter)s/%(track_number)02d - %(track)s.%(ext)s"

How to Run

Assuming a system with Python installed, replace EMAIL/PASSWORD with your own EMAIL/PASSWORD. You'll need to own the relevant items in your Forteller account, obviously. And change the URL to the correct URL from the website.

python3 -m pip install -U git+https://github.com/captn3m0/yt-dlp@forteller
yt-dlp --username "EMAIL" --password "YOURPASSWORD" --embed-metadata --lazy-playlist https://www.fortellergames.com/narrations/cephalofair/jaws-of-the-lion  -o "%(disc_number)02d - %(chapter)s/%(track_number)02d - %(track)s.%(ext)s"

TODO:

  • Support childNodes which are used for decision based track listings, in City Events.
  • Clean up as per yt-dlp conventions
  • File PR upstream
  • Make it easier to run?

Known Issues

  • Downloads will break after 60 minutes, in case the session expires. You can rerun the same command, and it will continue the download from prior.
  • Conditional tracks, such as those in City Event cards in Gloomhaven are not downloaded.

IMPORTANT: PRs without the template will be CLOSED

Description of your pull request and other information

ADD DESCRIPTION HERE

Fixes #

Template

Before submitting a pull request make sure you have:

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check all of the following options that apply:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

@gudyfr
Copy link

gudyfr commented Apr 11, 2023

Caching the api call for "stream-key" results in bogus re-runs of the downloader if one deletes the already downloaded content.

@ctiradhorkel
Copy link

how do I get the "proper url" ? this portion is not clear... thank you

@captn3m0
Copy link
Owner Author

captn3m0 commented Jul 1, 2023

The proper URL is the forteller website link (such as https://www.fortellergames.com/narrations/cephalofair/gloomhaven) . I think I have a bug somewhere in the code, and it picks the first one available in your purchases.

Let me know if it doesn't work.

@ctiradhorkel
Copy link

no it does not work... I have sigle purchase and it downloads only the 2 free showcase files... The link I'm using is
https://www.fortellergames.com/narrations/cephalofair/jaws-of-the-lion

@YoshkinCat
Copy link

Hi! First of all, thanks for the extractor!

My friend ran into an issue using it:

[Forteller] Logging in
[Forteller] Extracting URL: https://www.fortellergames.com/narrations/cephalofair/jaws-of-the-lion
[Forteller] Downloading narration page
ERROR: [Forteller] narrations: Unable to extract sku; 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

Is there a fix or workaround for the issue?

@captn3m0
Copy link
Owner Author

captn3m0 commented Oct 21, 2023 via email

@captn3m0
Copy link
Owner Author

captn3m0 commented Nov 7, 2023

@YoshkinCat I couldn't figure out enough details from your error report. The "Unable to extract sky" string does not appear in the code, so I'm not sure where this error is coming from.

Could you re-run it with the complete URL and let me know the response?

yt-dlp --verbose  --embed-metadata --lazy-playlist  https://www.fortellergames.com/narrations/cephalofair/jaws-of-the-lion  -o "%(disc_number)02d - %(chapter)s/%(track_number)02d - %(track)s.%(ext)s" --username "EMAIL" --password "PASSWORD"

I'm reachable at Matrix if you'd like to chat for a faster debug session.

@captn3m0
Copy link
Owner Author

captn3m0 commented Nov 7, 2023

@ctiradhorkel Can you provide verbose output with the suggested command? I just tried running it again against JOTL, and it works perfectly fine for me: https://pastebin.ubuntu.com/p/3FVb5KGyb7/

@ctiradhorkel
Copy link

@ctiradhorkel Can you provide verbose output with the suggested command? I just tried running it again against JOTL, and it works perfectly fine for me: https://pastebin.ubuntu.com/p/3FVb5KGyb7/

Sure, be more than happy to... https://pastebin.ubuntu.com/p/Nvcbk6zRmV/

The problem is that for some reason I'm never authenticated, it aways downloads only two demo videos from youtube and the folder and files are named "NA - NA"

Please let me know if I can help you any more

@captn3m0
Copy link
Owner Author

captn3m0 commented Nov 8, 2023

@ctiradhorkel looks you don't have the extractor installed, so the generic yt-dlp code is instead picking it up, finding the samples embedded on the website, and downloading those instead. Running yt-dlp --list-extractors|grep Forteller should validate whether you have the extractor or not.

You will need to be running the code in this branch for it to work. I've pushed some minor changes that avoid the complicate SKU lookup, but something like the following should get you up and running with this extractor:

python3 -m venv forteller
source forteller/bin/activate
pip install git+https://github.com/captn3m0/yt-dlp.git@forteller
./forteller/bin/yt-dlp --version
./forteller/bin/yt-dlp --list-extractors|grep Forteller

Assuming the above works, make sure you have your creds in your ~/.netrc file:

machine forteller
  login email@example.com
  password yourpasswordgoeshere

And then, you can run the downloader:

./forteller/bin/yt-dlp --verbose  --embed-metadata --lazy-playlist  https://www.fortellergames.com/products/jaws-of-the-lion  -o "%(disc_number)02d - %(chapter)s/%(track_number)02d - %(track)s.%(ext)s" --netrc forteller

Note that the newest code uses /products/* links, instead of the /narration links from earlier.

@ctiradhorkel
Copy link

@ctiradhorkel looks you don't have the extractor installed, so the generic yt-dlp code is instead picking it up, finding the samples embedded on the website, and downloading those instead. Running yt-dlp --list-extractors|grep Forteller should validate whether you have the extractor or not.

You will need to be running the code in this branch for it to work. I've pushed some minor changes that avoid the complicate SKU lookup, but something like the following should get you up and running with this extractor:

python3 -m venv forteller
source forteller/bin/activate
pip install git+https://github.com/captn3m0/yt-dlp.git@forteller
./forteller/bin/yt-dlp --version
./forteller/bin/yt-dlp --list-extractors|grep Forteller

Assuming the above works, make sure you have your creds in your ~/.netrc file:

machine forteller
  login email@example.com
  password yourpasswordgoeshere

And then, you can run the downloader:

./forteller/bin/yt-dlp --verbose  --embed-metadata --lazy-playlist  https://www.fortellergames.com/products/jaws-of-the-lion  -o "%(disc_number)02d - %(chapter)s/%(track_number)02d - %(track)s.%(ext)s" --netrc forteller

Note that the newest code uses /products/* links, instead of the /narration links from earlier.

Hi there,

I'm sorry for late reply, your instructions worked flawlessly... So I bought also the Frosthaven, and those are not downloading correctly, only the first file per set unfortunately...

@ctiradhorkel
Copy link

@captn3m0 You a re probably bussy, but I love to hear from you back. Thank you ;)

@captn3m0
Copy link
Owner Author

@ctiradhorkel I've sent you a mail regarding this 👍🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants