import requests
url = 'http://www.ygdy8.com/'
headers = {
'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
'Accept-Encoding':'gzip, deflate',
'Accept-Language':'en-US,en;q=0.8,zh-CN;q=0.6,zh;q=0.4',
'Cache-Control':'max-age=0',
'Connection':'keep-alive',
'Cookie':'37cs_pidx=1; 37cs_user=37cs78691413268; 37cs_show=69; UM_distinctid=15e36b74d82561-042fa83480e0e9-8383667-1fa400-15e36b74d836c6; CNZZDATA5783118=cnzz_eid%3D1135589022-1504151834-%26ntime%3D1504151834; cscpvrich4016_fidx=3',
'Host':'www.ygdy8.com',
'If-Modified-Since':'Wed, 30 Aug 2017 14:38:20 GMT',
'If-None-Match':'"056e49f9d21d31:530"',
'Upgrade-Insecure-Requests':'1',
'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36'
}
req = requests.get(url)
status_code = req.status_code
print(status_code)
req.encoding = 'gb2312'
html = req.text
movie_html = html
print(movie_html)