-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
4 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c8b83a2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This solution will not work for snatching torrents/magnet files, through the manual search. For this I have implemented an Auth Hook. I'm finetuning this. The idea is that all the cookie checks will be removed from login(), as login is just supposed to login.
Hi i'm using this commit to create some awareness: @pymedusa/developers, and to see if my change will also help you @medariox
Then a new dict will be added to GenericProvider, which you can use to configure your provider. For ex. if you know that the provider needs 4 cookies, and you want to check for expired cookies. You could set this:
self.auth_hooks = {'min_amount_cookies': 4, 'check_cookie_expired': True}
If you want to do something really fancy, you can overwrite and place the method the following method in your provider:
The above function will also only be run just before it tries to perform the GET or POST.