1

enter image description here

New to Python and web scraping here. I'm trying to understand the Basic Access Authentication parameter in the requests library. For example, if I am trying to use the post method as follows:

requests.post("www.somewebsite.com", data = some_data, auth = ('user', 'pass'))

What exactly is the 'user' and 'pass' parameter? Do I need to create an account for that respective website and pass in my account's username and password? I tried running my query without the 'auth' parameter and I return a 403 status code, so it is my understanding that I need to include the 'auth' parameter.

Any advice regarding this will help, thank you.

1 Answer 1

1

Any Api have it's own authentication process. You mentioned Github, which requires a username and password to authenticate. Some Api's may require some kind of access-token or stuff like that.

You can gain more information from Here.

Sign up to request clarification or add additional context in comments.

1 Comment

Great, thank you! So I am assuming I would need to generate a username and password, or an access-token from the website to gain access.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.