Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python requests with login

>>> r = requests.get('https://api.github.com/user', auth=('user', 'pass'))
>>> r.status_code
200
>>> r.headers['content-type']
'application/json; charset=utf8'
>>> r.encoding
'utf-8'
>>> r.text
'{"type":"User"...'
>>> r.json()
{'private_gists': 419, 'total_private_repos': 77, ...}
Comment

PREVIOUS NEXT
Code Example
Python :: python get methods of object 
Python :: move mouse round in python 
Python :: python flask mail 
Python :: python add to list with index 
Python :: ipython read audio file 
Python :: how to seperate words and number in a list 
Python :: get a list of ids from queryset django 
Python :: pandas remove item from dictionary 
Python :: get all h1 beautifulsoup 
Python :: __gt__ 
Python :: icon tkiner 
Python :: how to randomize order of a list python 
Python :: how to import pygame 
Python :: ipython play sound 
Python :: python selenium clear input 
Python :: generate gif py 
Python :: python sqlite dict 
Python :: mad libs in python 
Python :: python random real 
Python :: tofixed in python 
Python :: python update installed packages 
Python :: make sure text is on page selenium python 
Python :: python getting class name 
Python :: pandas dataframe scan column for values between numbers 
Python :: merge on row number python 
Python :: django rest 
Python :: detect keypress in python 
Python :: dataframe fill none 
Python :: python list comprehension if else 
Python :: how to add column to np array 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =