I am scraping a site in an hourly basis through post requests but everyday the authorisation bearer token changes and I have to copy paste new token from the site to my headers dict. How can I automate this so that I don’t have to copy paste this new token everyday. Is there any way so that I can get the token through site link and save it as a variable so that I can pass through the header dict. Any type of help is appreciated.
-
1Can you do a plain request to the site and extract the token from the HTML?– Nacho RCommented Apr 20, 2022 at 17:58
-
1Please provide enough code so others can better understand or reproduce the problem.– Community BotCommented Apr 21, 2022 at 8:32
-
1@NachoR The token is not present in the HTML. It is present in the network section of the site.– Animesh PandeyCommented Apr 21, 2022 at 16:41
Add a comment
|