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

Fixed 403 error, added 480P #12

Open
wants to merge 89 commits into
base: master
Choose a base branch
from
Open

Conversation

Arctic4161
Copy link

Fixed 403 error, added 480P. Fixed Issue with not finding the right resolution. Also added checking of the link and only downloading video if an mp4 file is returned.

Fixed issues with colorama not displaying correctly
Added refer to get around 403 forbidden error
Fixed quality selection and website from slowing down the download due to multiple requests at once.
removed useless code
Cleaned up code
Cleaned up code, removed varibles in conflict with system variables
Reset thread_map
Remove buffer size, fix error colorization
Added 5 retries for files that randomly end being only 3kb's in size.
Small 3kb files results from download links with no files. link with no files gives out status code 200. built in url check when checking for resolution
remove buffer and reset download_episodes req.get
Reformated and added link checks for each quality. Added output when program fails to download as well as removes the file
Changed get_download_links to a method.
added check to see if content downloading is mp4 if not check next link.
Added print locks so threads aren't printing over each other
Added 480P
@port19x
Copy link

port19x commented Oct 19, 2021

Just skimmed the code and didn't find any problem. Maybe someone else verify the colorama changes, but for the webscraping part, random timeouts and a spoofed referer are common and good practice.
I hope this can get merged, but in the future maybe don't PR 20 commits at once 😅

@sh1nobuu
Copy link
Owner

Just skimmed the code and didn't find any problem. Maybe someone else verify the colorama changes, but for the webscraping part, random timeouts and a spoofed referer are common and good practice. I hope this can get merged, but in the future maybe don't PR 20 commits at once 😅

Thanks for the suggestion man sorry for the inconvenience.

@FireHead90544
Copy link

Just skimmed the code and didn't find any problem. Maybe someone else verify the colorama changes, but for the webscraping part, random timeouts and a spoofed referer are common and good practice. I hope this can get merged, but in the future maybe don't PR 20 commits at once 😅

This is because gogoanime's cdn recently updated their required headers, I updated them in the code and generated a PR, but the repo's owner is facing some issues with internet sadly, he will check it soon and will update them. So, just wait for some time to get it fixed :)

@Arctic4161
Copy link
Author

Just skimmed the code and didn't find any problem. Maybe someone else verify the colorama changes, but for the webscraping part, random timeouts and a spoofed referer are common and good practice. I hope this can get merged, but in the future maybe don't PR 20 commits at once 😅

Sorry about that. Everytime I thought I found a solution gogoanime threw it back in my face lol. Finally figured it out. Checked what the link was giving me and moved on if it wasn't an mp4 file.

@sh1nobuu
Copy link
Owner

Just skimmed the code and didn't find any problem. Maybe someone else verify the colorama changes, but for the webscraping part, random timeouts and a spoofed referer are common and good practice. I hope this can get merged, but in the future maybe don't PR 20 commits at once 😅

Sorry about that. Everytime I thought I found a solution gogoanime threw it back in my face lol. Finally figured it out. Checked what the link was giving me and moved on if it wasn't an mp4 file.

No worries man gogo is really like that lmao that's why adding a new server (aside from gogocdn) is a good solution. I already solve it on my local repo i just can't push it to remote rn.

@Arctic4161
Copy link
Author

Just skimmed the code and didn't find any problem. Maybe someone else verify the colorama changes, but for the webscraping part, random timeouts and a spoofed referer are common and good practice. I hope this can get merged, but in the future maybe don't PR 20 commits at once 😅

Sorry about that. Everytime I thought I found a solution gogoanime threw it back in my face lol. Finally figured it out. Checked what the link was giving me and moved on if it wasn't an mp4 file.

No worries man gogo is really like that lmao that's why adding a new server (aside from gogocdn) is a good solution. I already solve it on my local repo i just can't push it to remote rn.

One more thing you should work on is allowing the user to select a certain episode. Say episode 9 or so. The code I wrote will delete a file that fails the download. You set it to do a range but sometimes I only need 1 episode. Also allow the user to input the anime name without the dash. Also, moving this to a GUI would be nice if you are thinking about doing other servers. Drop downs for stuff like that would be nice

@sh1nobuu
Copy link
Owner

Just skimmed the code and didn't find any problem. Maybe someone else verify the colorama changes, but for the webscraping part, random timeouts and a spoofed referer are common and good practice. I hope this can get merged, but in the future maybe don't PR 20 commits at once 😅

Sorry about that. Everytime I thought I found a solution gogoanime threw it back in my face lol. Finally figured it out. Checked what the link was giving me and moved on if it wasn't an mp4 file.

No worries man gogo is really like that lmao that's why adding a new server (aside from gogocdn) is a good solution. I already solve it on my local repo i just can't push it to remote rn.

One more thing you should work on is allowing the user to select a certain episode. Say episode 9 or so. The code I wrote will delete a file that fails the download. You set it to do a range but sometimes I only need 1 episode. Also allow the user to input the anime name without the dash. Also, moving this to a GUI would be nice if you are thinking about doing other servers. Drop downs for stuff like that would be nice

Thanks for the recommendation man. I'll work on that. Do you think converting the bitanime.py into a class base is a good thing? Here on my local repo i did convert the bitanime.py into a class base since the application is getting i thing (imo) it's a good, so if you can give me your opinion about that, that would be great. Yes im planning on making a gui version (using kivy) though I'm having trouble since request lib is a synchronous lib which def not a good pair with kivy.

@Arctic4161
Copy link
Author

Just skimmed the code and didn't find any problem. Maybe someone else verify the colorama changes, but for the webscraping part, random timeouts and a spoofed referer are common and good practice. I hope this can get merged, but in the future maybe don't PR 20 commits at once 😅

Sorry about that. Everytime I thought I found a solution gogoanime threw it back in my face lol. Finally figured it out. Checked what the link was giving me and moved on if it wasn't an mp4 file.

No worries man gogo is really like that lmao that's why adding a new server (aside from gogocdn) is a good solution. I already solve it on my local repo i just can't push it to remote rn.

One more thing you should work on is allowing the user to select a certain episode. Say episode 9 or so. The code I wrote will delete a file that fails the download. You set it to do a range but sometimes I only need 1 episode. Also allow the user to input the anime name without the dash. Also, moving this to a GUI would be nice if you are thinking about doing other servers. Drop downs for stuff like that would be nice

Thanks for the recommendation man. I'll work on that. Do you think converting the bitanime.py into a class base is a good thing? Here on my local repo i did convert the bitanime.py into a class base since the application is getting i thing (imo) it's a good, so if you can give me your opinion about that, that would be great. Yes im planning on making a gui version (using kivy) though I'm having trouble since request lib is a synchronous lib which def not a good pair with kivy.

I would use tkinter to start out. Built in python and easer to code in. The hard part would be coding the threads. I can shoot you a small GUI example with multi threading for executing a task. GUI's freeze up if execute a task in the gui thread and tkinter only plays well with a certain multithread class

@Arctic4161
Copy link
Author

Just skimmed the code and didn't find any problem. Maybe someone else verify the colorama changes, but for the webscraping part, random timeouts and a spoofed referer are common and good practice. I hope this can get merged, but in the future maybe don't PR 20 commits at once 😅

Sorry about that. Everytime I thought I found a solution gogoanime threw it back in my face lol. Finally figured it out. Checked what the link was giving me and moved on if it wasn't an mp4 file.

No worries man gogo is really like that lmao that's why adding a new server (aside from gogocdn) is a good solution. I already solve it on my local repo i just can't push it to remote rn.

One more thing you should work on is allowing the user to select a certain episode. Say episode 9 or so. The code I wrote will delete a file that fails the download. You set it to do a range but sometimes I only need 1 episode. Also allow the user to input the anime name without the dash. Also, moving this to a GUI would be nice if you are thinking about doing other servers. Drop downs for stuff like that would be nice

Thanks for the recommendation man. I'll work on that. Do you think converting the bitanime.py into a class base is a good thing? Here on my local repo i did convert the bitanime.py into a class base since the application is getting i thing (imo) it's a good, so if you can give me your opinion about that, that would be great. Yes im planning on making a gui version (using kivy) though I'm having trouble since request lib is a synchronous lib which def not a good pair with kivy.

Essentially you'll have 2 Classes in bitanime.py. You'll have your GUI class and then a thread task. Your gui class runs on a loop and when you click a button or however you set it up it will execute your threaded class.

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.

None yet

7 participants