zoukankan      html  css  js  c++  java
  • 一个奇怪的编码 big5-hkscs

    # --*-- coding:utf-8 --*--
    import urllib2
    import urllib
    
    postDict = {
        'IsExist_Slt_Part_Id': 'False',
        'IsExist_Slt_Stock_Id': 'False',
        'current_page': '1',
        'rdo_SelectSortBy': 'Shareholding',
        'sel_ShareholdingDate_d': '12',
        'sel_ShareholdingDate_m': '02',
        'sel_ShareholdingDate_y': '2014',
        'stock_market': 'HKEX',
        'txt_ParticipantID': '',
        'txt_Participant_name': '',
        'txt_stock_code': '02088',
        'txt_stock_name': '',
        'txt_today_d': '4',
        'txt_today_m': '5',
        'txt_today_y': '2014'
    }
    
    postData = urllib.urlencode(postDict)
    url = 'http://www.hkexnews.hk/sdw/search/search_sdw_c.asp'
    req = urllib2.Request(url=url, data=postData)
    req.add_header('User-Agent', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0')
    req.add_header('Content-Type', 'application/x-www-form-urlencoded')
    
    res = urllib2.urlopen(req).read().decode('big5-hkscs')
    print res
  • 相关阅读:
    计算机组成原理学习总纲图
    USE RED
    既有的问题如何解决
    字符串极值题解
    扩展 KMP
    KMP
    FHQ-Treap
    STL
    iOS内存管理理论知识过一遍
    iOS中Block理论知识过一遍
  • 原文地址:https://www.cnblogs.com/i80386/p/3707563.html
Copyright © 2011-2022 走看看