Serene-Arc / bulk-downloader-for-reddit

Downloads and archives content from reddit
https://pypi.org/project/bdfr
GNU General Public License v3.0
2.28k stars 211 forks source link

[SITE] RedGifs API changes #652

Closed OMEGARAZER closed 2 years ago

OMEGARAZER commented 2 years ago

Seems like redgifs made some changes that are causing bdfr to throw 403s on any that it encounters.

Serene-Arc commented 2 years ago

Greaaaaaat now I have to go see porn to try and fix this, ffs.

Thanks for bringing it to my attention.

Serene-Arc commented 2 years ago

Fixed in d60b4e7

cramberries commented 2 years ago

Hi @Serene-Arc. Sorry for potentially making you go look at porn again but I still seem to be getting 403 on most, if not all, RedGIFs posts.

I have the latest dev branch via git.

Serene-Arc commented 2 years ago

Hmm my tests are working just fine. Can you double check that you've pulled the latest from git? Running pip install -U git+https://github.com/aliparlakci/bulk-downloader-for-reddit.git@development, maybe in a virtual environment, should be enough to check that.

If it's still failing, could you share the logs with the failures? If there are specific redgif IDs that are failing, that would be a big help. They seem to be doing some backend stuff. We don't actually use their registered API. Ali is the one that coded this originally so I don't know how he found it, but we don't have a key and just request from an open API. So far just changing the server returned manually was enough to fix this but if it's not a long term solution, better to know now.

cramberries commented 2 years ago

Sorry for the delay. I had to wait for something I was doing to be finished before I can use a new VM.

Can you double check that you've pulled the latest from git?

I've honestly just been using git pull to update it and it's just giving me an "Already up to date." response. Haha.

in a virtual environment

So, I installed BDFR using the code you provided on a VM and tried it on an account I'm sure would give errors on my main system and it worked great! No Error 403 or anything at all. So, at least the problem is just me and not BDFR. Yay, thank you!

But would it be okay to ask how I can replicate this on my main system? I tried doing the same as in the VM but I'm still getting the errors. I thought of just copying the format in the VM but I can't even find where new BDFR instance is installed. Haha. I found a BDFR folder in AppData/Local but it only has a .cfg file.

Oh nvm, I found it in the Lib/site-packages folder! Haha. But I still can't replicate it on my main system. 😕

I just reintalled Python and Git (but they were already up-to-date before), then ran the install code in my main BDFR folder, and it works flawlessly again now! I even got the year-old "outdated praw" thingy out of the way. Haha. Can't run scripts without putting py -m at the beginning now though but that's a small concession to make.

Thanks for the help, Serene! And sorry for the hassle. 😅

They seem to be doing some backend stuff.

I also noticed something in RedGIF is messing up with uMatrix on and potentially another add-on I have that I can't identify since no GIFs would play on my Firefox at all. It works alright with Private or other browsers though.

Serene-Arc commented 2 years ago

All good! If you don't install an editable egg with pip install -e . then simply pulling with git won't update the installed package. I'm glad it's working again.

GarethFreeman commented 2 years ago

Hate to make you look at porn again Serene, buuuut I have been trying to fix a 403 error I keep getting and I am not able to fix it at all. Tried reinstalling python, pip install again. Tried editing reddit keys, but nothing seems to work for me.

This is the code I keep getting with -v added to see if you can help me out with this one

[2022-09-10 15:37:22,814 - bdfr.downloader - DEBUG] - Attempting to download submission wwm43o [2022-09-10 15:37:22,815 - bdfr.downloader - DEBUG] - Using Redgifs with url https://www.redgifs.com/watch/gloriouskindlyviper [2022-09-10 15:37:23,116 - bdfr.downloader - ERROR] - Failed to download resource https://thumbs4.redgifs.com/GloriousKindlyViper.mp4?expires=1662822000&signature=61c5447ccb55f2bf61c000d8e0e00036a48dc0c9090aca4a3cfb9e27396dc65c&for=83.87.48.127 in submission wwm43o with downloader Redgifs: Unrecoverable error requesting resource: HTTP Code 403

Getting the same problem.