Guest User

request function

a guest
Jul 10th, 2015
430
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. import urllib2, urllib
  2. def request(url,data,cookie):
  3.     headers = {"Cookie": cookie}
  4.     req = urllib2.Request(url, data, headers)
  5.     response = urllib2.urlopen(req).read()
  6.     return response
Advertisement
Add Comment
Please, Sign In to add comment