sh1nobuu / BitAnime

A Python script that allows you to download all of an anime's episodes at once.
23 stars 10 forks source link

Fixed 403 error, added 480P #12

Closed Arctic4161 closed 3 months ago

Arctic4161 commented 2 years ago

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.

port19x commented 2 years ago

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 :sweat_smile:

sh1nobuu commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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.

sh1nobuu commented 2 years ago

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

Yep that's my problem when i tried to use tkinter before the gui freezes (i didn't know about events that time) I might use it again idk yet since i want it to be flexible (gui for pc and cp) so i thought kivy would be a good tool for this. thanks for the recommendation tho.

Arctic4161 commented 2 years ago

That is a good point. I only code for windows. Anyways, if you don't know already Pycharm is what you want to be coding in. Makes it a breeze. Especially for debugging. Can't wait to see where you go with this.

sh1nobuu commented 2 years ago

That is a good point. I only code for windows. Anyways, if you don't know already Pycharm is what you want to be coding in. Makes it a breeze. Especially for debugging. Can't wait to see where you go with this.

I'll try using pycharm again thanks man having a potato cp is rough can't even run pycharm without lagging.

GitHubQueenn commented 2 years ago

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.

Wait, will this also do 720 and 1080p? I want best quality that each episode has.

Arctic4161 commented 2 years ago

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.

Wait, will this also do 720 and 1080p? I want best quality that each episode has.

Yeah it will, use this fork. Sh1nobuu hasn't merged them yet

FireHead90544 commented 2 years ago

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

I guess the best would be to use Qt as GUI framework (specifically, PySide2), I already had made plans to create a GUI version of the BitAnime, but as I am having my important exams this year, I have postponed that task, I am well familiar with PyQt5/PySide2, so if you want a GUI ready, I can provide you the UI of it for now, which you can use to write the backend logic only. And an advantage is that in tkinter you have to use threading.Thread() for multithreading to prevent GUI freezes, in PyQt/PySide, there is an in built thread class (QThread) alone for this purpose. Let me know your opinions on this.

sh1nobuu commented 2 years ago

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

I guess the best would be to use Qt as GUI framework (specifically, PySide2), I already had made plans to create a GUI version of the BitAnime, but as I am having my important exams this year, I have postponed that task, I am well familiar with PyQt5/PySide2, so if you want a GUI ready, I can provide you the UI of it for now, which you can use to write the backend logic only. And an advantage is that in tkinter you have to use threading.Thread() for multithreading to prevent GUI freezes, in PyQt/PySide, there is an in built thread class (QThread) alone for this purpose. Let me know your opinions on this.

This is definitely a good thing if you can make it man. With a GUI a lot of people can use the app since it's more user friendly.

FireHead90544 commented 2 years ago

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

I guess the best would be to use Qt as GUI framework (specifically, PySide2), I already had made plans to create a GUI version of the BitAnime, but as I am having my important exams this year, I have postponed that task, I am well familiar with PyQt5/PySide2, so if you want a GUI ready, I can provide you the UI of it for now, which you can use to write the backend logic only. And an advantage is that in tkinter you have to use threading.Thread() for multithreading to prevent GUI freezes, in PyQt/PySide, there is an in built thread class (QThread) alone for this purpose. Let me know your opinions on this.

This is definitely a good thing if you can make it man. With a GUI a lot of people can use the app since it's more user friendly.

Yeah okay sure mate, I'll do it. Are ya on Discord or something?

FireHead90544 commented 2 years ago

Btw @sh1nobuu I would suggest you to add hacktoberfest in the repository's topic, which might help increase the amount of useful contributions to the repo during the month of October (which is gonna end soon lol), rest up to you :)

sh1nobuu commented 2 years ago

@FireHead90544 thanks a lot mate, sadly i don't have a discord account. thanks for the suggestions mate but i can't do that rn the script still looks shit (no proper documentation), sometimes it's broken, I need to fix the issue first before i do that. Thanks for the suggestions man appreciated it.

FireHead90544 commented 2 years ago

@FireHead90544 thanks a lot mate, sadly i don't have a discord account. thanks for the suggestions mate but i can't do that rn the script still looks shit (no proper documentation), sometimes it's broken, I need to fix the issue first before i do that. Thanks for the suggestions man appreciated it.

Welcome :D No problem at all mate. Just asked for discord so that I could send the example/screenshots of the GUI part and converse if anything needs to be changed etc etc. Lol 😂