sdaqo / anipy-cli

Little tool in python to watch and download anime from the terminal (the better way to watch anime). Also applicable as an API
https://sdaqo.github.io/anipy-cli
GNU General Public License v3.0
270 stars 40 forks source link

Fix "Remote Disconnected" Error #198

Closed DragonOfShuu closed 2 months ago

DragonOfShuu commented 2 months ago

This solves #197 by creating a method inside of the base provider for requesting pages and another for creating a new session. If requesting the page causes an error, it will create a new session to try again (in case of a broken connection).

The reason I added a function for creating a session is for if a future provider were to require cookies or a password, thus it can override this function.

I don't mind the nitpicks; hopefully this change will be easier to follow and less intense than the last PR lol.

DragonOfShuu commented 2 months ago

Man, Python really needs a protected method naming convention XD

DragonOfShuu commented 2 months ago

There we go, made the necessary changes. I love this project by the way! I'm happy to make PRs

sdaqo commented 2 months ago

LGTM. Thanks for all the PRs, very much appreciated!