11

作者: sha0q | 来源:发表于2016-12-12 20:15 被阅读0次
import urllib2
# from gzip import GzipFile
# from StringIO import StringIO
# def gzip(data):
#     buf = StringIO(data)
#     f = GzipFile(fileobj=buf)
#     return f.read()


url='http://bbs.cssn.cn/index.php?60171'
headers={
#'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0',
#'Accept-Encoding': 'gzip, deflate',
'Cookie': '2Sqh_2132_saltkey=T01NBQ48; 2Sqh_2132_ids_login_301=http%253A%252F%252Fbbs.cssn.cn%252Findex.php%253F60171; 2Sqh_2132_lastvisit=1481538392; 2Sqh_2132_sid=K1zTST; 2Sqh_2132_lastact=1481543815%09home.php%09misc; 2Sqh_2132_home_diymode=1; X-Mapping-kgaapcic=41C75F95FB88274C37DC7C7A6F15D428; 2Sqh_2132_ids_token=692F2090DC4FFA1897DC023B3DAE1A5A192.168.93.39; 2Sqh_2132_ids_token_type=com_trs_idm_gSessionId; CNZZDATA5791385=cnzz_eid%3D1089799930-1481536901-%26ntime%3D1481542849; wdcid=330595def0bb5c95; wdlast=1481462967; 2Sqh_2132_sendmail=1',

}
req = urllib2.Request(url,headers=headers)
a=urllib2.urlopen(req).read()
print a
#print gzip(a)

相关文章

  • Every day in November

    11月1日 11月2日 11月3日 11月4日 11月5日 11月6日 11月7日 11月8日 11月9日 11月...

  • 无标题文章

    #1 #11 ##11 ###11

  • 无标题文章11

    无标题文章11无标题文章11无标题文章11无标题文章11无标题文章11无标题文章11无标题文章11无标题文章11无...

  • 2018-11-10

    2018年11/11(记录11/10实际情况) 打卡日期:2018年/11月/11 打卡累计天数:11/60 ...

  • 11月睡眠记录

    11月1日: 晚上11:40睡。 11月2号:晚上11:50睡。 11月3号: 晚上11:35睡。 11月4号:...

  • Answer

    2018/11/5 2018/11/6 2018/11/15 2018/11/17 2018/11/21 2018...

  • Chinese

    2018/11/5 2018/11/6 2018/11/15 2018/11/17 2018/11/21 2018...

  • English

    2018/11/5 2018/11/6 2018/11/15 2018/11/17 2018/11/20 2018...

  • MySQL时间函数

    1. now now() 返回当前时间戳 selectnow(); --2017-11-11 11:11:11 2...

  • 给字符串在特定位置添加特殊标识

    eg:11111111 要变成11-11-11-11; var oldStr="11111111"; //str:...

网友评论

      本文标题:11

      本文链接:https://www.haomeiwen.com/subject/mpfvmttx.html