Skip to content

Instantly share code, notes, and snippets.

@quarkness
Created March 9, 2012 12:59
Show Gist options
  • Save quarkness/2006433 to your computer and use it in GitHub Desktop.
Save quarkness/2006433 to your computer and use it in GitHub Desktop.
AD Emopoll
import requests
# vote:vote-emo6
# componentId:3221789
# language:nl
headers = {
'Accept':'application/json, text/javascript, */*; q=0.01',
'X-Requested-With': 'XMLHttpRequest',
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.78 Safari/535.11',
'Origin': 'http://www.ad.nl',
'Referer': 'http://www.ad.nl/ad/nl/9124/Het-weer/article/detail/3222916/2012/03/09/NS-top-krijgt-geen-bonus.dhtml',
}
payload = {
'vote': 'vote-emo6',
'componentId': '3222916',
'language': 'nl',
}
r = requests.post("http://www.ad.nl/ad/article/emoVotes.do", data=payload, headers=headers)
print r.status_code
print r.headers
print r.content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment