Closed ru111 closed 3 years ago
Huh, good question. I assume that a combination of cookies and using the same user agent and source IP address should do the trick, but I've never tried.
What browser are you using? And what Python library for making the request?
Is there a way to pass specific user agent and source IP? I'm using google chrome browser on a mac and the python library I'm using to download the page to pdf is pdfkit https://pypi.org/project/pdfkit/
Sorry, I hadn't seen the edit with the example code.
No, your source IP should be wherever you're making the request from, so if you tried to log in from home and then make a request from some remote server, it would probably flag that.
You'll need to look at the requests documentation for setting the user agent in requests, that's not a pycookiecheat thing.
Thanks for the info, I'm actually using the same machine so the IP should be the same with browser & python access. I understand that this is not a pycookiecheat's issue, but thanks for pointing me to user agents because now I've passed my user agent in the request it gets the correct page. Thanks again!
That's awesome, I'm glad to hear it!
If the issue is resolved, would you mind closing?
Is there a way to bypass an initial two-factor authentication ("you are logging in from a new browser, send an authentication code to email")? I am logged in on chrome but through python it registers as "new browser". Thank you for developing this by the way, it has made getting past the login page so easy.
I'm just using simple script to download a pdf at
url
which requires login. But unfortunately this downloads the page after the username & password login telling me that I need to authenticate using a code by either clicking on "Send me an email" or "Send me a text" button (which presumably directs you to a page with an input field for this code). If there is a miraculous way to get through this page it'd be grand but otherwise it seems understandable - I suppose it makes sense considering they use the "are you a robot?" checks sometimes as well.