I suspect that you need to use requests.Session()
url = 'https://...'
login = 'login'
password = 'password'
s = requests.Session()
r = s.get(url, auth=(login, password))
Once you come to use some library, start with reading the documentation for that library, usually there are answers to most of your questions.
More often, reading other people's code helps us to understand how (or not so) to use a particular tool. Script authorizeuser in Vkontakte and rocking music, perhaps every aspiring pitonak. It is easy to find.
Some articles on scraping websites with python. They will certainly urllib or requests. For example, here
In General, seek and ye shall find =)
Here and the result is sent to Google, hmm. =)
upd. Once you smooochies for yourself, try to solve the problem here: checkio.org
. Most useful is not just to solve problems, and see how the same task was solved the other lot will open and in the solution of the next tasks will always be available (challenge, if you are an experienced nerd, is also an end in itself). In the examples left by others there as well-documented, and crazy decisions wrapped up in one row.