I-am-PUID-0 / pd_zurg

A combined docker image for the unified deployment of itsToggle's, yowmamasita's, and ncw's projects -- plex_debrid, zurg, and rclone
MIT License
167 stars 13 forks source link

Allow use of GITHUB_TOKEN when not sponsoring Zurg #77

Open jopsis opened 5 days ago

jopsis commented 5 days ago

Describe the bug

Failed to recreate the container.

Oct 18, 2024 23:15:13 - INFO -

 _______  ______       _______           _______  _______
(  ____ )(  __  \     / ___   )|\     /|(  ____ )(  ____ \
| (    )|| (  \  )    \/   )  || )   ( || (    )|| (    \/
| (____)|| |   ) |        /   )| |   | || (____)|| |
|  _____)| |   | |       /   / | |   | ||     __)| | ____
| (      | |   ) |      /   /  | |   | || (\ (   | | \_  )
| )      | (__/  )     /   (_/\| (___) || ) \ \__| (___) |
|/       (______/_____(_______/(_______)|/   \__/(_______)
                (_____)
                        Version: 2.9.1

Oct 18, 2024 23:15:13 - INFO - Setting up Zurg
Oct 18, 2024 23:15:13 - INFO - Setting up Zurg w/ RealDebrid instance in directory: /zurg/RD/
Oct 18, 2024 23:15:13 - INFO - Fetching latest zurg release.
Oct 18, 2024 23:15:14 - ERROR - Failed to fetch https://api.github.com/repos/debridmediamanager/zurg/releases/latest after 5 attempts.
Oct 18, 2024 23:15:14 - ERROR - Error: Unable to access the repository API.
Oct 18, 2024 23:15:14 - ERROR - An error occurred: Failed to get the latest release version.

Access to this url https://api.github.com/repos/debridmediamanager/zurg/releases/latest gets the next error:

{
  "message": "Not Found",
  "documentation_url": "https://docs.github.com/rest/releases/releases#get-the-latest-release",
  "status": "404"
}

To Reproduce

Recreate from zero the container.

Please complete the following information:

jopsis commented 3 days ago

I review the code

If I put github token as env var, the downloader try to download from zurg (Sponsors only) repo instead zurg-testing.

https://github.com/debridmediamanager/zurg-testing

image

I-am-PUID-0 commented 2 days ago

Ah. Yes, I forgot it will try to pull from the sponsored repo. Are you still having issues with the GitHub rate limit?

jopsis commented 2 days ago

Ah. Yes, I forgot it will try to pull from the sponsored repo. Are you still having issues with the GitHub rate limit?

Yes... ☹️ ☹️ ☹️ ☹️ ☹️

I used gluetun with windscribe to be able to get another IP and I was able to create the container, but then I have to change all containers (plex, jackett, etc) to network_mode: container:gluetun and everything works much slower.

For now, I don't want to use gluetun because my ISP hasn't banned anything, but this ‘ban’ for github :-(

Any idea to resolv the problem with github?

I-am-PUID-0 commented 2 days ago

Can you set PDZURG_LOG_LEVEL=DEBUG and provide the logs?

jopsis commented 2 days ago

Is activated

image

but don´t show more data

image

And, after of this 3000 seconds, fail with "ERROR - Failed to fetch https://api.github.com/repos/debridmediamanager/zurg-testing/releases/latest after 5 attempts."

I-am-PUID-0 commented 2 days ago

From the host, try docker exec -it pd_zurg ping api.github.com

jopsis commented 2 days ago

From the host, try docker exec -it pd_zurg ping api.github.com

I have connection:

image

I forked your project, change https://github.com/I-am-PUID-0/pd_zurg/blob/master/zurg/download.py to zurg-testing If you set token or no, create a new docker image from my local modifications and now works, download from zurg-testing with auth token

I-am-PUID-0 commented 1 day ago

Ok. I'll see if I can modify the setup process to allow for the use of the GITHUB_TOKEN even if not sponsoring Zurg.