Python3 using requests to grab HTTP Auth Data
Νίκος Βέργος
me.on.nzt at gmail.com
Wed Feb 1 15:48:57 EST 2017
More information about the Python-list mailing list
Wed Feb 1 15:48:57 EST 2017
- Previous message (by thread): Python3 using requests to grab HTTP Auth Data
- Next message (by thread): Python3 using requests to grab HTTP Auth Data
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Τη Τετάρτη, 1 Φεβρουαρίου 2017 - 9:22:46 μ.μ. UTC+2, ο χρήστης Chris > You should use the input() function (called raw_input() in Python 2) > for a user name, and the getpass module for the password: i have just tried: # Give user the file requested url = "http://superhost.gr/data/files/%s" % realfile username = getpass.getuser() password = getpass.getpass() r = requests.get( url, auth = (username, password) )# ask user for authentication data r.raise_for_status()
- Previous message (by thread): Python3 using requests to grab HTTP Auth Data
- Next message (by thread): Python3 using requests to grab HTTP Auth Data
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list