zoukankan      html  css  js  c++  java
  • 【未解决,待研究】论一只爬虫的自我修养2:实战

    windows 8.1 内核是windows NT 6.3

    Form Data:表单数据

    urllib.request.urlopen(url, data=None[, timeout], *, cafile=None, capath=None, cadefault=True)

    Open the URL url, which can be either a string or a Request object.

    data must be a bytes object specifying additional data to be sent to the server, or None if no such data is needed. data may also be an iterable object and in that case Content-Length value must be specified in the headers. Currently HTTP requests are the only ones that use data; the HTTP request will be a POST instead of a GET when the data parameter is provided.

    data should be a buffer in the standard application/x-www-form-urlencoded format. The urllib.parse.urlencode() function takes a mapping or sequence of 2-tuples and returns a string in this format.

    备注:

    实例1:translation前提:

    答案:

     我的练习:

    http://fanyi.youdao.com/translate_o?smartresult=dict&smartresult=rule

    1. i:
      I love fishc.com
    2. from:
      AUTO
    3. to:
      AUTO
    4. smartresult:
      dict
    5. client:
      fanyideskweb
    6. salt:
      1537240082549
    7. sign:
      d265da743dfa3a03206adb092d75280a
    8. doctype:
      json
    9. version:
      2.1
    10. keyfrom:
      fanyi.web
    11. action:
      FY_BY_CLICKBUTTION
    12. typoResult:
      false

    报如下错误:

     

    解决方法:

    https://fishc.com.cn/forum.php?mod=viewthread&tid=106892&highlight=%C5%C0%B3%E6

    http://www.tendcode.com/article/youdao-spider/

  • 相关阅读:
    洛谷P3157 [CQOI2011]动态逆序对
    CDQ分治
    快速数论变换(NTT)
    洛谷P3338 [ZJOI2014]力
    洛谷 P1919 A*B Problem升级版
    0-1分数规划
    洛谷P4593 [TJOI2018]教科书般的亵渎
    拉格朗日插值
    20180912-3 词频统计
    20190912-1 每周例行报告
  • 原文地址:https://www.cnblogs.com/jiangkeji/p/9668525.html
Copyright © 2011-2022 走看看