Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import urllib.parse
- import urllib.request
- from urllib.request import Request, urlopen
- from urllib.error import URLError
- url = 'http://www.kcchronicle.com/athlete-of-the-month/'
- headers = {'Connection' : 'keep-alive',
- 'Cache-Control' : 'max-age=0',
- 'Origin' : 'http://kcchronicle.com',
- 'Upgrade-Insecure-Requests' : '1',
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',
- 'Content-type' : 'application/x-www-form-urlencoded',
- 'Accept' : 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
- 'Referer' : 'http://kcchronicle.com/athlete-of-the-month/',
- 'Accept-Encoding' : 'gzip, deflate',
- 'Accept-Language' : 'en-US,en;q=0.8',
- 'Cookie' : 'aotm-logged-in=1; aotm-fb-connected=0; aotm-email=badesso1@gmail.com; fid=%7B%22iv%22%3A%22LHdCQLVj81B5d2GJy%2BEz5A%22%2C%22v%22%3A1%2C%22iter%22%3A1000%2C%22ks%22%3A128%2C%22ts%22%3A64%2C%22mode%22%3A%22ccm%22%2C%22adata%22%3A%22%22%2C%22cipher%22%3A%22aes%22%2C%22salt%22%3A%22sOaWjdKSBDk%22%2C%22ct%22%3A%22%2FxMmX2z0dHySknOzTjmZBfzmZEd0dVX9v00mg3ydT81us1NWEnG1dY2cWD2kU%2BRDnFIhsIsbD%2BWbUXEIJGfyNAd54fhp89Yw%2BJnZqn6uXfEsZP4JfkZvKw%22%7D'
- }
- values = {'vote' : '1',
- 'pollid' : '41',
- 'optionid' : '210' }
- data = urllib.parse.urlencode(values)
- data = data.encode('ascii')
- req = urllib.request.Request(url, data, headers)
- with urllib.request.urlopen(req) as response:
- the_page = response.read()
- headers1 = {'Connection' : 'keep-alive',
- 'Cache-Control' : 'max-age=0',
- 'Origin' : 'http://kcchronicle.com',
- 'Upgrade-Insecure-Requests' : '1',
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',
- 'Content-type' : 'application/x-www-form-urlencoded',
- 'Accept' : 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
- 'Referer' : 'http://kcchronicle.com/athlete-of-the-month/',
- 'Accept-Encoding' : 'gzip, deflate',
- 'Accept-Language' : 'en-US,en;q=0.8',
- 'Cookie' : 'aotm-logged-in=1; aotm-fb-connected=0; aotm-email=bmx4l143@aol.com; fid=%7B%22iv%22%3A%22LHdCQLVj81B5d2GJy%2BEz5A%22%2C%22v%22%3A1%2C%22iter%22%3A1000%2C%22ks%22%3A128%2C%22ts%22%3A64%2C%22mode%22%3A%22ccm%22%2C%22adata%22%3A%22%22%2C%22cipher%22%3A%22aes%22%2C%22salt%22%3A%22sOaWjdKSBDk%22%2C%22ct%22%3A%22%2FxMmX2z0dHySknOzTjmZBfzmZEd0dVX9v00mg3ydT81us1NWEnG1dY2cWD2kU%2BRDnFIhsIsbD%2BWbUXEIJGfyNAd54fhp89Yw%2BJnZqn6uXfEsZP4JfkZvKw%22%7D'
- }
- req = urllib.request.Request(url, data, headers1)
- with urllib.request.urlopen(req) as response:
- the_page = response.read()
- headers2 = {'Connection' : 'keep-alive',
- 'Cache-Control' : 'max-age=0',
- 'Origin' : 'http://kcchronicle.com',
- 'Upgrade-Insecure-Requests' : '1',
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',
- 'Content-type' : 'application/x-www-form-urlencoded',
- 'Accept' : 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
- 'Referer' : 'http://kcchronicle.com/athlete-of-the-month/',
- 'Accept-Encoding' : 'gzip, deflate',
- 'Accept-Language' : 'en-US,en;q=0.8',
- 'Cookie' : 'aotm-logged-in=1; aotm-fb-connected=0; aotm-email=iwonhitwonder@gmail.com; fid=%7B%22iv%22%3A%22lRnn4P66gy2LOXlefmZlbQ%22%2C%22v%22%3A1%2C%22iter%22%3A1000%2C%22ks%22%3A128%2C%22ts%22%3A64%2C%22mode%22%3A%22ccm%22%2C%22adata%22%3A%22%22%2C%22cipher%22%3A%22aes%22%2C%22salt%22%3A%229Kp7DIjU74Y%22%2C%22ct%22%3A%22s1bMvJIt%2FWuxgh0TsPPNt27L1aT0fS5GRFHB1cW4xCeFZXDYoXK2XyZwOPEArG9OdhR2YB3vri0r7kZKY2sXdwga62xbjnpTMTHLwPsYonDA1gIGDc7U4g%22%7D'
- }
- req = urllib.request.Request(url, data, headers2)
- with urllib.request.urlopen(req) as response:
- the_page = response.read()
- headers3 = {'Connection' : 'keep-alive',
- 'Cache-Control' : 'max-age=0',
- 'Origin' : 'http://kcchronicle.com',
- 'Upgrade-Insecure-Requests' : '1',
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',
- 'Content-type' : 'application/x-www-form-urlencoded',
- 'Accept' : 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
- 'Referer' : 'http://kcchronicle.com/athlete-of-the-month/',
- 'Accept-Encoding' : 'gzip, deflate',
- 'Accept-Language' : 'en-US,en;q=0.8',
- 'Cookie' : 'aotm-logged-in=1; aotm-fb-connected=0; aotm-email=8008670@students.d303.org; fid=%7B%22iv%22%3A%22lRnn4P66gy2LOXlefmZlbQ%22%2C%22v%22%3A1%2C%22iter%22%3A1000%2C%22ks%22%3A128%2C%22ts%22%3A64%2C%22mode%22%3A%22ccm%22%2C%22adata%22%3A%22%22%2C%22cipher%22%3A%22aes%22%2C%22salt%22%3A%229Kp7DIjU74Y%22%2C%22ct%22%3A%22s1bMvJIt%2FWuxgh0TsPPNt27L1aT0fS5GRFHB1cW4xCeFZXDYoXK2XyZwOPEArG9OdhR2YB3vri0r7kZKY2sXdwga62xbjnpTMTHLwPsYonDA1gIGDc7U4g%22%7D'
- }
- req = urllib.request.Request(url, data, headers3)
- with urllib.request.urlopen(req) as response:
- the_page = response.read()
- headers4 = {'Connection' : 'keep-alive',
- 'Cache-Control' : 'max-age=0',
- 'Origin' : 'http://kcchronicle.com',
- 'Upgrade-Insecure-Requests' : '1',
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',
- 'Content-type' : 'application/x-www-form-urlencoded',
- 'Accept' : 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
- 'Referer' : 'http://kcchronicle.com/athlete-of-the-month/',
- 'Accept-Encoding' : 'gzip, deflate',
- 'Accept-Language' : 'en-US,en;q=0.8',
- 'Cookie' : 'aotm-logged-in=1; aotm-fb-connected=0; aotm-email=fakename912@gmail.com; fid=%7B%22iv%22%3A%22lRnn4P66gy2LOXlefmZlbQ%22%2C%22v%22%3A1%2C%22iter%22%3A1000%2C%22ks%22%3A128%2C%22ts%22%3A64%2C%22mode%22%3A%22ccm%22%2C%22adata%22%3A%22%22%2C%22cipher%22%3A%22aes%22%2C%22salt%22%3A%229Kp7DIjU74Y%22%2C%22ct%22%3A%22s1bMvJIt%2FWuxgh0TsPPNt27L1aT0fS5GRFHB1cW4xCeFZXDYoXK2XyZwOPEArG9OdhR2YB3vri0r7kZKY2sXdwga62xbjnpTMTHLwPsYonDA1gIGDc7U4g%22%7D'
- }
- req = urllib.request.Request(url, data, headers4)
- with urllib.request.urlopen(req) as response:
- the_page = response.read()
- headers5 = {'Connection' : 'keep-alive',
- 'Cache-Control' : 'max-age=0',
- 'Origin' : 'http://kcchronicle.com',
- 'Upgrade-Insecure-Requests' : '1',
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',
- 'Content-type' : 'application/x-www-form-urlencoded',
- 'Accept' : 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
- 'Referer' : 'http://kcchronicle.com/athlete-of-the-month/',
- 'Accept-Encoding' : 'gzip, deflate',
- 'Accept-Language' : 'en-US,en;q=0.8',
- 'Cookie' : 'aotm-logged-in=1; aotm-fb-connected=0; aotm-email=rivenhentai123@gmail.com; fid=%7B%22iv%22%3A%22lRnn4P66gy2LOXlefmZlbQ%22%2C%22v%22%3A1%2C%22iter%22%3A1000%2C%22ks%22%3A128%2C%22ts%22%3A64%2C%22mode%22%3A%22ccm%22%2C%22adata%22%3A%22%22%2C%22cipher%22%3A%22aes%22%2C%22salt%22%3A%229Kp7DIjU74Y%22%2C%22ct%22%3A%22s1bMvJIt%2FWuxgh0TsPPNt27L1aT0fS5GRFHB1cW4xCeFZXDYoXK2XyZwOPEArG9OdhR2YB3vri0r7kZKY2sXdwga62xbjnpTMTHLwPsYonDA1gIGDc7U4g%22%7D'
- }
- req = urllib.request.Request(url, data, headers5)
- with urllib.request.urlopen(req) as response:
- the_page = response.read()
- headers6 = {'Connection' : 'keep-alive',
- 'Cache-Control' : 'max-age=0',
- 'Origin' : 'http://kcchronicle.com',
- 'Upgrade-Insecure-Requests' : '1',
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',
- 'Content-type' : 'application/x-www-form-urlencoded',
- 'Accept' : 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
- 'Referer' : 'http://kcchronicle.com/athlete-of-the-month/',
- 'Accept-Encoding' : 'gzip, deflate',
- 'Accept-Language' : 'en-US,en;q=0.8',
- 'Cookie' : 'aotm-logged-in=1; aotm-fb-connected=0; aotm-email=elliotisdumb1234@gmail.com; fid=%7B%22iv%22%3A%22lRnn4P66gy2LOXlefmZlbQ%22%2C%22v%22%3A1%2C%22iter%22%3A1000%2C%22ks%22%3A128%2C%22ts%22%3A64%2C%22mode%22%3A%22ccm%22%2C%22adata%22%3A%22%22%2C%22cipher%22%3A%22aes%22%2C%22salt%22%3A%229Kp7DIjU74Y%22%2C%22ct%22%3A%22s1bMvJIt%2FWuxgh0TsPPNt27L1aT0fS5GRFHB1cW4xCeFZXDYoXK2XyZwOPEArG9OdhR2YB3vri0r7kZKY2sXdwga62xbjnpTMTHLwPsYonDA1gIGDc7U4g%22%7D'
- }
- req = urllib.request.Request(url, data, headers6)
- with urllib.request.urlopen(req) as response:
- the_page = response.read()
- headers7 = {'Connection' : 'keep-alive',
- 'Cache-Control' : 'max-age=0',
- 'Origin' : 'http://kcchronicle.com',
- 'Upgrade-Insecure-Requests' : '1',
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',
- 'Content-type' : 'application/x-www-form-urlencoded',
- 'Accept' : 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
- 'Referer' : 'http://kcchronicle.com/athlete-of-the-month/',
- 'Accept-Encoding' : 'gzip, deflate',
- 'Accept-Language' : 'en-US,en;q=0.8',
- 'Cookie' : 'aotm-logged-in=1; aotm-fb-connected=0; aotm-email=lisa063@hotmail.com; fid=%7B%22iv%22%3A%22lRnn4P66gy2LOXlefmZlbQ%22%2C%22v%22%3A1%2C%22iter%22%3A1000%2C%22ks%22%3A128%2C%22ts%22%3A64%2C%22mode%22%3A%22ccm%22%2C%22adata%22%3A%22%22%2C%22cipher%22%3A%22aes%22%2C%22salt%22%3A%229Kp7DIjU74Y%22%2C%22ct%22%3A%22s1bMvJIt%2FWuxgh0TsPPNt27L1aT0fS5GRFHB1cW4xCeFZXDYoXK2XyZwOPEArG9OdhR2YB3vri0r7kZKY2sXdwga62xbjnpTMTHLwPsYonDA1gIGDc7U4g%22%7D'
- }
- req = urllib.request.Request(url, data, headers7)
- with urllib.request.urlopen(req) as response:
- the_page = response.read()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement