Giter Club home page Giter Club logo

gb-dl's Introduction

Hey, I'm Josh Pohl.

I’m a software engineer working remotely somewhere in the US. I love walking, photography, and container queries.

Find me elsewhere on Mastodon.

gb-dl's People

Contributors

delver26 avatar dependabot[bot] avatar lightpohl 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

Watchers

 avatar  avatar

gb-dl's Issues

Append Video ID When Downloading

Hello!

Apologies for this, I'm not certain about the etiquette of commenting on issues on GitHub - using the tool to download Mass Alex today, after yesterday's news, and I was wondering if there's a way to get the tool to add the video ids while downloading. I ask because there's a Plex agent that matches with GB, but it uses the video ids to do so.

https://github.com/rspeicher/GiantBomb.bundle is the Plex Agent in question.

Cannot download recently uploaded videos

Some recent videos are producing an error when I attempt to download them. I noticed the error while trying to download premium videos starting with "Giant Bombcast 775" (Feb 7, 2023). That video and the next few after it all produced an error and failed to download (UnhandledPromiseRejectionWarning: HTTPError: Response code 403 (Forbidden)).

There was a recent change to the video URLs which may be related. It looks like videos starting from from Feb 1st onward are at a different domain than the older videos and the URLs for the new videos now include a query string at the end for "exp" and "sig". The output path for the file when it tries to download it includes this query string after the file extension.

Download Highest Bitrate Possible

Apologies for this, I'm new commenting on issues on GitHub. Was using tool to download various series on the site and noticed it only downloads the 4000 bitrate not the 8000. Not a huge deal but I was just curious if it was possible to do so or an API issue. Thanks.

Unable to use javascript loop on "This Is the Run"

I am trying to run this javascript loop (I removed my API key and added in comments for the start/end so that I don't confuse myself:

let execSync = require("child_process").execSync;

// Replace `YOUR_API_KEY` with the key from https://www.giantbomb.com/api
let apiKey = "YOUR_API_KEY";

/*
  Finding the `endingEpisode` is a little tricky if there are multiple seasons
  of a show, but you can add the `--info` command with different `--video-number` numbers
  to find it before running the script.
*/
let showName = "This Is The Run";
let startingEpisodeNumber = 50; // LATEST episode to download
let endingEpisode = 52; // FIRST episode to download

/*
  For simplicity, we're going to download in reverse order, but you could
  switch it by adjusting the `for` loop below.
*/
for (let i = startingEpisodeNumber; i <= endingEpisode; i++) {
  try {
    execSync(
      `npx gb-dl --api-key ${apiKey} --show-name ${showName} --video-number ${i}`,
      { stdio: "inherit" } // this will allow us to see the console output as it downloads
    );
  } catch (error) {
    console.error(error);
    console.log("Something happened! Moving onto the next video.");
  }
}

I get this error message (edited to remove API key):

PS D:\Downloads\GB> node .\titr.js
npx: installed 38 in 3.925s
no video found for query
Error: Command failed: npx gb-dl --api-key YOUR_API_KEY --show-name This Is The Run --video-number 50
at checkExecSyncError (child_process.js:616:11)
at execSync (child_process.js:652:15)
at Object. (D:\Downloads\GB\titr.js:33:5)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 5364,
stdout: null,
stderr: null
}
Something happened! Moving onto the next video.
npx: installed 38 in 3.035s
no video found for query
Error: Command failed: npx gb-dl --api-key YOUR_API_KEY --show-name This Is The Run --video-number 51
at checkExecSyncError (child_process.js:616:11)
at execSync (child_process.js:652:15)
at Object. (D:\Downloads\GB\titr.js:33:5)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 7304,
stdout: null,
stderr: null
}
Something happened! Moving onto the next video.
npx: installed 38 in 3.207s
no video found for query
Error: Command failed: npx gb-dl --api-key YOUR_API_KEY --show-name This Is The Run --video-number 52
at checkExecSyncError (child_process.js:616:11)
at execSync (child_process.js:652:15)
at Object. (D:\Downloads\GB\titr.js:33:5)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 16288,
stdout: null,
stderr: null
}
Something happened! Moving onto the next video.
PS D:\Downloads\GB>

New maxBitrate logic doesn't respect archive

The conversion from 4000->8000 happens after the archive check but before the archive writing. This results in 8000 bitrate files always being redownloaded, since the archive will be checked for the 4000 bitrate file but will have the 8000 bitrate file recorded.

Thanks!

Output directory not working in batch

When trying to batch download shows the script will not work if I put in the --out-dir option and get an "SyntaxError: Unexpected end of input" error.

The command in the script looks like this npx gb-dl --api-key ${apiKey} --show-name "${showName}" --video-number ${i} --video-number-reverse --add-guid-prefix --out-dir "D:\gb-dl-2.11.0\New folder".

Not downloading highest quality - HD not found

Latest release, on Windows 10.

gb-dl-win-x64.exe --api-key <clipped> --video-name "Quick Look: New Pokémon Snap"

This downloads vf_ql_newpokemonsnap_050421_3200.mp4 (the 'high' quality), even though "hd_url": "[...]vf_ql_newpokemonsnap_050421_4000.mp4" is returned by the API. Attempting to force it results in:

gb-dl-win-x64.exe --api-key <clipped> --video-name "Quick Look: New Pokémon Snap" --quality hd
quality hd not found for Quick Look: New Pokémon Snap

There is also an even higher quality version available at vf_ql_newpokemonsnap_050421_8000.mp4, but this appears to be an API limitation.

Unable to find recently created shows

I tried to use gb-dl to get info for an episode from Blight Club: npx gb-dl --api-key <KEY> --show-name "Blight Club" --video-number 0 --info

I receive the following error: no show found for Blight Club

The GB API does have a show object for Blight Club, however it can only be found by offsetting the video_shows API request:

https://www.giantbomb.com/api/video_shows/?api_key=KEY&format=json&offset=100

(It's not clear there are >100 shows due to the API erroneously having number_of_total_results set to the same thing as number_of_page_results)

Error when running via cron

Hi, thanks for the awesome tool. I'm loving it so far!
I'm running this on an install of OMV (Debian based)
I've recently attempted to schedule the script to run as I've been using it to download the most recent 20 videos from the site.

When I run my script manually it works perfectly, but when it runs through cron it throws what looks to be a memory error.
I've attached the output log when running in debug mode. (with API key removed)
error.log

I've also attached the script. Here's the command used for the cron job if that helps.
gb-dl.js.txt
command:
cd /configs/giantbombcli/ && /usr/bin/node gb-dl.js

I'm not familiar with node.js to be honest so I'm not sure if I need to run it in a certain way.
Thanks in advance!

[Bug] Inaccurate maximum bitrate URL

Version: 3.1.2

This is related to the previous issue: #4

Although the current workaround worked at the time, there have been two changes since then.

Firstly, the videos on 2021-06-30 and afterwards began encoding to 5000 kbps instead of 4000. You can see this in the "Quick Look: Twelve Minutes" video with GUID 2300-17151.

Secondly, the videos on 2022-03-16 and afterwards use a different template entirely (i.e. "vf_ql_tunic_031622_027_1_1080h5000k.mp4" from "Quick Look: Tunic" with GUID 2300-17633).

To accurately grab the maximum bitrate 8000 kbps URLs for these videos, updates would need to be made to the code to include both of the above situations.

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.