Skip to content

Instantly share code, notes, and snippets.

@AaronPhalen
Last active October 3, 2015 07:25
Show Gist options
  • Save AaronPhalen/c1938e5ee9720f3e835a to your computer and use it in GitHub Desktop.
Save AaronPhalen/c1938e5ee9720f3e835a to your computer and use it in GitHub Desktop.
Examples of using python to make request, aggregate cookies, spoof proxy & user agent.
# Author: Aaron Phalen | Twitter: @aaron_phalen | Email: [email protected]
# import necessary libraries
from cookielib import Cookie, CookieJar
import urllib, urllib2
import requests
# spoofing user-agent (Mozilla FireFox)
USER_AGENT = "Mozilla/5.0"
# spoofing proxy server (Washington, US)
PROXY_SERVER = "37.98.224.153:8080"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment