Skip to content
This repository was archived by the owner on Dec 9, 2022. It is now read-only.

Conversation

@ryan-k8
Copy link
Contributor

@ryan-k8 ryan-k8 commented Dec 8, 2021

context : #11 #12
i have fixed this by adding an attribute user_agent in the constructor of the main class which is passed on as header option for every request made to the host.
the main gist of changes ⬇️

the constructor of the main class

def __init__(
            self,
            gogoanime_token: str,
            auth_token: str, 
            host: str = "https://gogoanime.pe/",
            user_agent:dict = {'User-Agent': 'Mozilla/5.0'},
    ):

now every get requests made to the host looks something like this

requests.get(animelink,headers=self.user_agent)
#or
session.get(url,headers=self.user_agent) 

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant