Created
October 22, 2016 16:04
-
-
Save anonymous/1078f4e653de5f1f9c6e98166b750212 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import sys | |
import requests | |
headers = { | |
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36', | |
} | |
cookies = { | |
'_ts_id': '999999999999999999', | |
} | |
r = requests.get('http://class.ruten.com.tw/user/index00.php?s=nevereverfor', headers=headers, cookies=cookies) | |
r.close() | |
r.encoding = r.apparent_encoding | |
#reload(sys) | |
#sys.setdefaultencoding("utf-8") | |
print r.text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment