Created
March 9, 2012 12:59
-
-
Save quarkness/2006433 to your computer and use it in GitHub Desktop.
AD Emopoll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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