鱼C论坛

 找回密码
 立即注册
查看: 1722|回复: 8

关于requests请求的问题求助?

[复制链接]
发表于 2019-1-21 20:56:32 | 显示全部楼层 |阅读模式
15鱼币
不理解requests.post传入参数请求是什么意思?
例如:
>>> import requests
>>> data = {
        'name':'LiLei'
        }
>>> response = requests.post('http://www.baidu.com',data=data)
>>> print(response.text)
这个响应结果可以正常返回的,太长了没有粘上

问题1:我想知道这个data数据传入百度网址什么地方了?是传入百度首页的输入框吗?
问题2:这个响应结果是百度输入框传入 name=LiLei   吗?然后点回车显示页面的审查元素吗?谢谢

想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2019-1-21 21:47:05 | 显示全部楼层
https://zhidao.baidu.com/question/1048272938344437739.html
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2019-1-22 08:08:15 | 显示全部楼层
把data上传到服务器。
建议去看一下Python爬取有道翻译那课,涉及到了有关知识。
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2019-1-22 09:44:33 | 显示全部楼层
本帖最后由 TCY 于 2019-1-22 09:47 编辑
  1. >>> import requests as req
  2. >>> data = {'name':'LiLei'}
  3. >>> url = 'http://www.baidu.com'
  4. >>> rg = req.get(url)
  5. >>> rp = req.post(url, data)
  6. >>> rg
  7. <Response [200]>
  8. >>> rp
  9. <Response [302]>
  10. >>> print(rg.text)
  11. <!DOCTYPE html>

  12. <!--STATUS OK--><html> <head><meta http-equiv=content-type content=text/html;charset=utf-8><meta http-equiv=X-UA-Compatible content=IE=Edge><meta content=always name=referrer><link rel=stylesheet type=text/css href=http://s1.bdstatic.com/r/www/cache/bdorz/baidu.min.css><title>&#231;&#153;&#190;&#229;o|&#228;&#184;&#128;&#228;&#184;&#139;&#239;&#188;&#140;&#228;&#189;&#160;&#229;°±&#231;&#159;¥é&#129;&#147;</title></head> <body link=#0000cc> <div id=wrapper> <div id=head> <div class=head_wrapper> <div class=s_form> <div class=s_form_wrapper> <div id=lg> <img hidefocus=true src=//www.baidu.com/img/bd_logo1.png width=270 height=129> </div> <form id=form name=f action=//www.baidu.com/s class=fm> <input type=hidden name=bdorz_come value=1> <input type=hidden name=ie value=utf-8> <input type=hidden name=f value=8> <input type=hidden name=rsv_bp value=1> <input type=hidden name=rsv_idx value=1> <input type=hidden name=tn value=baidu><span class="bg s_ipt_wr"><input id=kw name=wd class=s_ipt value maxlength=255 autocomplete=off autofocus></span><span class="bg s_btn_wr"><input type=submit id=su value=&#231;&#153;&#190;&#229;o|&#228;&#184;&#128;&#228;&#184;&#139; class="bg s_btn"></span> </form> </div> </div> <div id=u1> <a href=http://news.baidu.com name=tj_trnews class=mnav>&#230;&#150;°é&#151;&#187;</a> <a href=http://www.hao123.com name=tj_trhao123 class=mnav>hao123</a> <a href=http://map.baidu.com name=tj_trmap class=mnav>&#229;&#156;°&#229;&#155;&#190;</a> <a href=http://v.baidu.com name=tj_trvideo class=mnav>è§&#134;é¢&#145;</a> <a href=http://tieba.baidu.com name=tj_trtieba class=mnav>è′′&#229;&#144;§</a> <noscript> <a href=http://www.baidu.com/bdorz/login.gif?login&amp;tpl=mn&amp;u=http%3A%2F%2Fwww.baidu.com%2f%3fbdorz_come%3d1 name=tj_login class=lb>&#231;&#153;&#187;&#229;&#189;&#149;</a> </noscript> <script>document.write('<a href="http://www.baidu.com/bdorz/login.gif?login&tpl=mn&u='+ encodeURIComponent(window.location.href+ (window.location.search === "" ? "?" : "&")+ "bdorz_come=1")+ '" name="tj_login" class="lb">&#231;&#153;&#187;&#229;&#189;&#149;</a>');</script> <a href=//www.baidu.com/more/ name=tj_briicon class=bri style="display: block;">&#230;&#155;′&#229;¤&#154;&#228;o§&#229;&#147;&#129;</a> </div> </div> </div> <div id=ftCon> <div id=ftConw> <p id=lh> <a href=http://home.baidu.com>&#229;&#133;3&#228;o&#142;&#231;&#153;&#190;&#229;o|</a> <a href=http://ir.baidu.com>About Baidu</a> </p> <p id=cp>&copy;2017&nbsp;Baidu&nbsp;<a href=http://www.baidu.com/duty/>&#228;&#189;&#191;&#231;&#148;¨&#231;&#153;&#190;&#229;o|&#229;&#137;&#141;&#229;&#191;&#133;èˉ&#187;</a>&nbsp; <a href=http://jianyi.baidu.com/ class=cp-feedback>&#230;&#132;&#143;è§&#129;&#229;&#143;&#141;é|&#136;</a>&nbsp;&#228;o&#172;ICPèˉ&#129;030173&#229;&#143;·&nbsp; <img src=//www.baidu.com/img/gs.gif> </p> </div> </div> </div> </body> </html>


  13. >>> print(rp.text)
  14. <html>

  15. <head>

  16. <meta http-equiv="content-type" content="text/html;charset=utf-8">

  17. <style data-for="result" id="css_result">

  18. body{color:#333;background:#fff;padding:6px 0 0;margin:0;position:relative;min-width:900px}body,th,td,.p1,.p2{font-family:arial}p,form,ol,ul,li,dl,dt,dd,h3{margin:0;padding:0;list-style:none}input{padding-top:0;padding-bottom:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}table,img{border:0}td{font-size:9pt;line-height:18px}







  19. #foot{font-size:12px}.logo{width:117px;height:38px;cursor:pointer}



  20. #u,#head,#tool,#search,.p1{line-height:120%;margin-left:-12pt}.p2{width:100%;line-height:120%;margin-left:-12pt}#wrapper{_zoom:1}#container{word-break:break-all;word-wrap:break-word}.container_s{width:1002px}.container_l{width:1222px}#content_left{width:636px;float:left;padding-left:35px}#content_right{border-left:1px solid #e1e1e1;float:right}.container_s #content_right{width:271px}.container_l #content_right{width:434px}.content_none{padding-left:35px}#u{color:#999;white-space:nowrap;position:absolute;right:10px;top:4px;z-index:299}#u a{color:#00c;margin:0 5px}#u .reg{margin:0}#u .last{margin-right:0}#u .un{font-weight:bold;margin-right:5px}#u ul{width:100%;background:#fff;border:1px solid #9b9b9b}#u li{height:25px}#u li a{width:100%;height:25px;line-height:25px;display:block;text-align:left;text-decoration:none;text-indent:6px;margin:0;filter:none\9}#u li a:hover{background:#ebebeb}#u li.nl{border-top:1px solid #ebebeb}#user{position:relative;display:inline-block}#user_center{position:relative;display:inline-block}#user_center .user_center_btn{margin-right:5px}.userMenu{width:64px;position:absolute;right:7px;_right:2px;top:15px;top:14px\9;*top:15px;padding-top:4px;display:none;*background:#fff}#head{padding-left:35px;margin-bottom:20px;width:900px}



  21. .fm{clear:both;position:relative;z-index:297}.nv a,.nv b,.btn,#page,#more{font-size:14px}



  22. .s_nav{height:45px}.s_nav .s_logo{margin-right:20px;float:left}.s_nav .s_logo img{border:0;display:block}.s_tab{line-height:18px;padding:20px 0 0;float:left}.s_nav a{color:#00c;font-size:14px}.s_nav b{font-size:14px}.s_ipt_wr{width:536px;height:30px;display:inline-block;margin-right:5px;background-position:0 -96px;border:1px solid #b6b6b6;border-color:#7b7b7b #b6b6b6 #b6b6b6 #7b7b7b;vertical-align:top}.s_ipt{width:523px;height:22px;font:16px/22px arial;margin:5px 0 0 7px;padding:0;background:#fff;border:0;outline:0;-webkit-appearance:none}.s_btn{width:95px;height:32px;padding-top:2px\9;font-size:14px;padding:0;background-color:#ddd;background-position:0 -48px;border:0;cursor:pointer}.s_btn_h{background-position:-240px -48px}.s_btn_wr{width:97px;height:34px;display:inline-block;background-position:-120px -48px;*position:relative;z-index:0;vertical-align:top}.sethf{padding:0;margin:0;font-size:14px}.set_h{display:none;behavior:url(#default#homepage)}.set_f{display:none}.shouji{margin-left:19px}.shouji a{text-decoration:none}.bdsug{position:absolute;width:536px;background:#fff;display:none;border:1px solid #817f82}





  23. #page{font:14px arial;white-space:nowrap;padding-left:35px}#page a,#page strong{display:inline-block;vertical-align:text-bottom;height:66px;text-align:center;line-height:34px;text-decoration:none;overflow:hidden;margin-right:9px;background:white}#page a{cursor:pointer}#page a:hover{background:0}#page .n:hover,#page a:hover .pc{background:#f2f8ff;border:1px solid #38f}#page .n{height:34px;padding:0 18px;border:1px solid #e1e2e3}#page span{display:block}#page .pc{width:34px;height:34px;border:1px solid #e1e2e3;cursor:pointer}#page .fk{width:24px;height:24px;margin-bottom:6px;margin-left:6px;cursor:pointer}#page strong .fk,#page strong .pc{cursor:auto}#page .fk .c-icon-bear-pn{top:-3px;position:relative}#page .fkd .c-icon-bear-pn{top:3px;position:relative}#page .fk_cur .c-icon-bear-p{top:-2px;position:relative}#page strong .pc{border:0;width:36px;height:36px;line-height:36px}#page .nums{display:inline-block;vertical-align:text-bottom;height:36px;line-height:36px;margin-left:10px}#rs{width:900px;background:#fff;padding:8px 0;margin:20px 0 0 15px}#rs td{width:5%}#rs th{font-size:14px;font-weight:normal;line-height:19px;white-space:nowrap;text-align:left;vertical-align:top}#rs .tt{font-weight:bold;padding:0 10px 0 20px}#rs_top{font-size:14px;margin-bottom:22px}#rs_top a{margin-right:18px}#search{width:900px;padding:35px 0 16px 35px}#search .s_help{position:relative;top:10px}



  24. #foot{height:20px;line-height:20px;color:#77c;background:#e6e6e6;text-align:center}#foot span{color:#666}



  25. .to_zhidao,.to_tieba,.to_zhidao_bottom{font-size:16px;line-height:24px;margin:20px 0 0 35px}.to_tieba .c-icon-tieba{float:left}.f{line-height:115%;*line-height:120%;font-size:100%;width:33.7em;word-break:break-all;word-wrap:break-word}.h{margin-left:8px;width:100%}.r{word-break:break-all;cursor:hand;width:238px}.t{font-weight:normal;font-size:medium;margin-bottom:1px}.pl{padding-left:3px;height:8px;padding-right:2px;font-size:14px}.mo,a.mo:link,a.mo:visited{color:#666;font-size:100%;line-height:10px}.htb{margin-bottom:5px}.jc a{color:#c00}a font[size="3"] font,font[size="3"] a font{text-decoration:underline}div.blog,div.bbs{color:#707070;padding-top:2px;font-size:13px}.result{width:33.7em;table-layout:fixed}.result-op .f{word-wrap:normal}.nums{font-size:12px;color:#999}.tools{position:absolute;top:10px;white-space:nowrap}



  26. #mHolder{width:62px;position:relative;z-index:296;top:-18px;margin-left:9px;margin-right:-12px;display:none}#mCon{height:18px;position:absolute;top:3px;top:6px\9;cursor:pointer;line-height:18px}.wrapper_l #mCon{right:7px}#mCon span{color:#00c;cursor:default;display:block}#mCon .hw{text-decoration:underline;cursor:pointer;display:inline-block}#mCon .pinyin{display:inline-block}#mCon .c-icon-chevron-unfold2{margin-left:5px}#mMenu{width:56px;border:1px solid #9b9b9b;position:absolute;right:7px;top:23px;display:none;background:#fff}#mMenu a{width:100%;height:100%;color:#00c;display:block;line-height:22px;text-indent:6px;text-decoration:none;filter:none\9}#mMenu a:hover{background:#ebebeb}#mMenu .ln{height:1px;background:#ebebeb;overflow:hidden;font-size:1px;line-height:1px;margin-top:-1px}





  27. #index_guide{display:none}#index_logo{display:none}#u1{display:none}.s_ipt_wr{height:32px}body{padding:0}.s_form:after,.s_tab:after{content:".";display:block;height:0;clear:both;visibility:hidden}.s_form{zoom:1;height:63px;padding:0 0 0 10px}



  28. #result_logo{float:left;margin:11px 6px 0 6px}#result_logo img{width:104px}



  29. #head{padding:0;margin:0;width:100%;position:absolute;z-index:301;min-width:1000px;background:#fff;border-bottom:1px solid #ebebeb;position:fixed;_position:absolute}#head .head_wrapper{_width:1000px}#head.s_down{box-shadow:0 0 5px #888}.fm{clear:none;float:left;margin:15px 0 0 12px}#s_tab{background:#f8f8f8;line-height:36px;height:38px;padding:63px 0 0 138px;float:none;zoom:1}#s_tab a,#s_tab b{width:54px;display:inline-block;text-decoration:none;text-align:center;color:#666;font-size:14px}#s_tab b{border-bottom:2px solid #38f;font-weight:bold;color:#323232}#s_tab a:hover{color:#323232}#content_left{width:540px;padding-left:138px;padding-top:5px}#content_right{margin-top:45px}

  30. #page{padding:0 0 0 138px;margin:30px 0 40px 0}





  31. #help{background:#f5f6f5;zoom:1;padding:0 0 0 50px;float:right}#help a{color:#777;padding:0 15px;text-decoration:none}#help a:hover{color:#333}



  32. #foot{background:#f5f6f5;border-top:1px solid #ebebeb;text-align:left;height:42px;line-height:42px}#foot .foot_c{float:left;padding:0 0 0 138px}.content_none{padding:30px 0 0 138px}



  33. #mCon{top:5px}



  34. .s_ipt_wr.bg,.s_btn_wr.bg,#su.bg{background-image:none}.s_btn_wr{width:auto;height:auto;border-bottom:1px solid transparent;*border-bottom:0}.s_btn{width:100px;height:34px;color:white;letter-spacing:1px;background:#3385ff;border-bottom:1px solid #2d78f4;outline:medium;*border-bottom:0;-webkit-appearance:none;-webkit-border-radius:0}.s_btn.btnhover{background:#317ef3;border-bottom:1px solid #2868c8;*border-bottom:0;box-shadow:1px 1px 1px #ccc}



  35. .s_btn_h{background:#3075dc;box-shadow:inset 1px 1px 3px #2964bb;-webkit-box-shadow:inset 1px 1px 3px #2964bb;-moz-box-shadow:inset 1px 1px 3px #2964bb;-o-box-shadow:inset 1px 1px 3px #2964bb}#head .bdsug{top:33px}.bdsug{width:538px;border-color:#ccc;box-shadow:1px 1px 3px #ededed;-webkit-box-shadow:1px 1px 3px #ededed;-moz-box-shadow:1px 1px 3px #ededed;-o-box-shadow:1px 1px 3px #ededed}



  36. .bdsug.bdsugbg{background-repeat:no-repeat;background-position:100% 100%;background-size:100px 110px;background-image:url(http://s1.bdstatic.com/r/www/cache/static/home/img/sugbg_6a9201c2.png);background-image:url(http://s1.bdstatic.com/r/www/cache/static/home/img/sugbg_d24a0811.gif)\9}.bdsug li{width:522px;line-height:22px}.bdsug li.bdsug-s{background:#f0f0f0}.bdsug-ala h3{margin:8px 0 5px 0}#wrapper_wrapper .container_l .EC_ppim_top,#wrapper_wrapper .container_xl .EC_ppim_top{width:640px}#wrapper_wrapper .container_s .EC_ppim_top{width:570px}#head .c-icon-bear-round{display:none}.container_l #content_right{width:384px}.container_l{width:1212px}.container_xl #content_right{width:384px}.container_xl{width:1257px}.index_tab_top{display:none}.index_tab_bottom{display:none}#lg{display:none}#m{display:none}#ftCon{display:none}#ent_sug{margin:40px 0 0 145px;font-size:13px;color:#666}.c-icon{background:url(http://s1.bdstatic.com/r/www/cache/static/global/img/icons_3bfb8e45.png) no-repeat 0 0;_background-image:url("http://s1.bdstatic.com/r/www/cache/static/global/img/icons_f72fb1cc.gif")}







  37. </style>

  38. <meta http-equiv="X-UA-Compatible" content="IE=Edge">

  39. <title>é&#161;μé&#157;¢&#228;&#184;&#141;&#229;-&#152;&#229;&#156;¨_&#231;&#153;&#190;&#229;o|&#230;&#144;&#156;&#231;′¢</title>



  40. <style data-for="debug">

  41.         #debug{display:none!important}

  42. </style>



  43. <style data-for="result" id="css_index_result">

  44. #seth{display:none;behavior:url(#default#homepage)}#setf{display:none}#sekj{margin-left:14px}#st,#sekj{display:none}.s_ipt_wr{border:1px solid #b6b6b6;border-color:#7b7b7b #b6b6b6 #b6b6b6 #7b7b7b;background:#fff;display:inline-block;vertical-align:top;width:539px;margin-right:0;border-right-width:0;border-color:#b8b8b8 transparent #ccc #b8b8b8}/*.wrapper_s .s_ipt_wr{width:439px}*//*.wrapper_s .s_ipt{width:434px}*/.s_ipt_wr:hover,.s_ipt_wr.ipthover{border-color:#999 transparent #b3b3b3 #999}.s_ipt_wr.iptfocus{border-color:#4791ff transparent #4791ff #4791ff}.s_ipt_tip{color:#aaa;position:absolute}.s_ipt{width:526px;height:22px;font:16px/22px arial;margin:6px 0 0 7px;padding:0;background:transparent;border:0;outline:0;-webkit-appearance:none}#kw{position:relative}.bdpfmenu,.usermenu{border:1px solid #d1d1d1;position:absolute;width:105px;top:36px;padding:1px 0;z-index:302;overflow:hidden;box-shadow:1px 1px 5px #d1d1d1;-webkit-box-shadow:1px 1px 5px #d1d1d1;-moz-box-shadow:1px 1px 5px #d1d1d1;-o-box-shadow:1px 1px 5px #d1d1d1}

  45. .bdpfmenu{font-size:12px}.bdpfmenu a,.usermenu a{display:block;text-align:left;margin:0!important;padding:0 9px;line-height:26px;text-decoration:none}



  46. #u .bri:hover,#u .bri.brihover{background-position:-18px 3px}#mCon #imeSIcon{background-position:-408px -144px;margin-left:0}#mCon span{color:#333}.bdpfmenu a:link,.bdpfmenu a:visited,#u .usermenu a:link,#u .usermenu a:visited{background:white;color:#333}.bdpfmenu a:hover,.bdpfmenu a:active,#u .usermenu a:hover,#u .usermenu a:active{background:#38f;text-decoration:none;color:white}.bdpfmenu{width:70px}.usermenu{width:68px;right:8px}#wrapper .bdnuarrow{width:24px;height:13px;position:absolute;z-index:303;top:24px;background:url(http://s1.bdstatic.com/r/www/cache/static/home/img/sugbg_6a9201c2.png) no-repeat -90px -1px;background-size:300px 21px;background-image:url(http://s1.bdstatic.com/r/www/cache/static/home/img/icons_0a1fc6ac.gif)\9}#prefpanel{background:#fafafa;display:none;opacity:0;position:fixed;_position:absolute;top:-359px;z-index:500;width:100%;min-width:960px;height:359px;border-bottom:1px solid #ebebeb}#prefpanel form{_width:850px}#kw_tip{cursor:default;display:none}#bds-message-wrapper{top:43px}



  47. input::-ms-clear{display:none}

  48. </style>



  49. </head>



  50. <body link="#0000cc">

  51. <div id="wrapper" style="" class="wrapper_s">



  52. <div id="head"> <div class="head_wrapper"> <div class="s_form"> <div class="s_form_wrapper"> <div id="lg"> <img hidefocus="true" src="//www.baidu.com/img/bd_logo1.png" width="270" height="129"> </div> <a href="/" id="result_logo" onmousedown="return c({'fm':'tab','tab':'logo'})"> <img src="//www.baidu.com/img/baidu_jgylogo3.gif" alt="&#229;&#136;°&#231;&#153;&#190;&#229;o|é|&#150;é&#161;μ" title="&#229;&#136;°&#231;&#153;&#190;&#229;o|é|&#150;é&#161;μ"> </a> <form id="form" name="f" action="/s" class="fm"> <input type="hidden" name="ie" value="utf-8"> <input type="hidden" name="f" value="8"> <input type="hidden" name="rsv_bp" value="1"> <input type="hidden" name="rsv_idx" value="1"> <input type="hidden" name="ch" value=""> <input type="hidden" name="tn" value="baiduerr"> <input type="hidden" name="bar" value=""> <span class="bg s_ipt_wr"> <input id="kw_tip" unselectable="on" onselectstart="return false;" class="s_ipt s_ipt_tip" disabled="" autocomplete="off" value="" maxlength="100" style="display: none;"> <input id="kw" name="wd" class="s_ipt" value="" maxlength="100" autocomplete="off"> </span><span class="bg s_btn_wr"> <input type="submit" id="su" value="&#231;&#153;&#190;&#229;o|&#228;&#184;&#128;&#228;&#184;&#139;" class="bg s_btn"> </span><span class="tools"> <span id="mHolder"> <div id="mCon"> <span>è&#190;&#147;&#229;&#133;¥&#230;3&#149;</span> </div> <ul id="mMenu"> <li><a href="javascript:;" name="ime_hw">&#230;&#137;&#139;&#229;&#134;&#153;</a> </li> <li><a href="javascript:;" name="ime_py">&#230;&#139;&#188;é&#159;3</a> </li> <li class="ln"></li> <li><a href="javascript:;" name="ime_cl">&#229;&#133;3é&#151;-</a> </li> </ul> </span> <span class="shouji" style="display: none;"><a  onmousedown="return ns_c({'fm':'behs','tab':'bdbrowser'})">&#231;&#153;&#190;&#229;o|&#230;μ&#143;è§&#136;&#229;&#153;¨&#239;&#188;&#140;&#230;&#137;&#147;&#229;&#188;&#128;&#231;&#189;&#145;é&#161;μ&#229;&#191;&#171;2&#231;§&#146;&#239;&#188;&#129;</a> </span> </span> <input type="hidden" name="rn" value=""> <input type="hidden" name="rsv_enter" value="1"> </form> <div id="m"></div> </div></div> </div></div> <div class="s_tab" id="s_tab"> <b>&#231;&#189;&#145;é&#161;μ</b> <a  wdfield="word" onmousedown="return c({'fm':'tab','tab':'news'})">&#230;&#150;°é&#151;&#187;</a><a  wdfield="kw" onmousedown="return c({'fm':'tab','tab':'tieba'})">è′′&#229;&#144;§</a><a  wdfield="word" onmousedown="return c({'fm':'tab','tab':'zhidao'})">&#231;&#159;¥é&#129;&#147;</a><a  wdfield="key" onmousedown="return c({'fm':'tab','tab':'music'})">é&#159;3&#228;1&#144;</a><a  wdfield="word" onmousedown="return c({'fm':'tab','tab':'pic'})">&#229;&#155;&#190;&#231;&#137;&#135;</a><a  wdfield="word" onmousedown="return c({'fm':'tab','tab':'video'})">è§&#134;é¢&#145;</a><a  wdfield="word" onmousedown="return c({'fm':'tab','tab':'map'})">&#229;&#156;°&#229;&#155;&#190;</a><a  wdfield="word" onmousedown="return c({'fm':'tab','tab':'wenku'})">&#230;&#150;&#135;&#229;o&#147;</a><a href="//www.baidu.com/more/" onmousedown="return c({'fm':'tab','tab':'more'})">&#230;&#155;′&#229;¤&#154;&#194;&#187;</a> </div>

  53. <div id="ftCon"><div id="ftConw"><p id="lh"> <a id="seth" onclick="h(this)" href="/" onmousedown="return ns_c({'fm':'behs','tab':'homepage','pos':0})">&#230;&#138;&#138;&#231;&#153;&#190;&#229;o|è&#174;&#190;&#228;&#184;o&#228;&#184;&#187;é&#161;μ</a><a id="setf"  onmousedown="return ns_c({'fm':'behs','tab':'favorites','pos':0})" target="_blank" style="display: inline;">&#230;&#138;&#138;&#231;&#153;&#190;&#229;o|è&#174;&#190;&#228;&#184;o&#228;&#184;&#187;é&#161;μ</a><a onmousedown="return ns_c({'fm':'behs','tab':'tj_about'})" >&#229;&#133;3&#228;o&#142;&#231;&#153;&#190;&#229;o|</a><a onmousedown="return ns_c({'fm':'behs','tab':'tj_about_en'})" >About Baidu</a> </p> <p id="cp">&#194;&#169;2014&nbsp;Baidu&nbsp;<a href="/duty/" name="tj_duty">&#228;&#189;&#191;&#231;&#148;¨&#231;&#153;&#190;&#229;o|&#229;&#137;&#141;&#229;&#191;&#133;èˉ&#187;</a>&nbsp;&#228;o&#172;ICPèˉ&#129;030173&#229;&#143;·&nbsp;<i class="c-icon-icrlogo"></i> </p> </div> </div>

  54. <div id="wrapper_wrapper" style="display: block;">

  55.         <style>

  56.                         .nors{

  57.                                 position: relative;

  58.                         }

  59.                         .norsTitle{

  60.                                 font-size: 22px;

  61.                                 font-family: Microsoft Yahei;

  62.                                 font-weight: normal;

  63.                                 color: #333;

  64.                                 margin: 35px 0 25px 0;

  65.                         }

  66.                         .norsSuggest {

  67.                                 display: inline-block;

  68.                                 color:#333;

  69.                                 font-family:arial;

  70.                                 font-size: 13px;

  71.                                 position: relative;

  72.                         }



  73.                         .norsSuggest li{

  74.                                 list-style: decimal;

  75.                         }

  76.                         .norsTitle2 {

  77.                                 font-family: arial;

  78.                                 font-size: 13px;

  79.                                 color: #666;       

  80.                         }

  81.                         .norsSuggest li{

  82.                                 margin: 13px 0;

  83.                         }

  84.                         .norsSuggest ol{

  85.                                 margin-left: 47px;

  86.                         }

  87.                         #foot{

  88.                                 position: fixed;

  89.                                 _position: absolute;

  90.                                 bottom: 0;

  91.                                 width: 100%;

  92.                                 clear: both;

  93.                         }

  94.         </style>

  95.         <div id="content_left">

  96.                 <div class="nors">

  97.                         <div class="norsSuggest">

  98.                                 <h3 class="norsTitle">&#229;&#190;&#136;&#230;&#138;±&#230;-&#137;&#239;&#188;&#140;&#230;&#130;¨è|&#129;è&#174;&#191;é&#151;&#174;&#231;&#154;&#132;é&#161;μé&#157;¢&#228;&#184;&#141;&#229;-&#152;&#229;&#156;¨&#239;&#188;&#129;</h3>

  99.                                 <p class="norsTitle2">&#230;&#184;&#169;é|¨&#230;&#143;&#144;&#231;¤o&#239;&#188;&#154;</p>

  100.                                 <ol>

  101.                                         <li>èˉ·&#230;£&#128;&#230;&#159;¥&#230;&#130;¨è&#174;&#191;é&#151;&#174;&#231;&#154;&#132;&#231;&#189;&#145;&#229;&#157;&#128;&#230;&#152;ˉ&#229;&#144;|&#230;-£&#231;&#161;&#174;</li>

  102.                                         <li>&#229;|&#130;&#230;&#158;&#156;&#230;&#130;¨&#228;&#184;&#141;è&#131;&#189;&#231;&#161;&#174;è&#174;¤è&#174;&#191;é&#151;&#174;&#231;&#154;&#132;&#231;&#189;&#145;&#229;&#157;&#128;&#239;&#188;&#140;èˉ·&#230;μ&#143;è§&#136;<a >&#231;&#153;&#190;&#229;o|&#230;&#155;′&#229;¤&#154;</a>é&#161;μé&#157;¢&#230;&#159;¥&#231;&#156;&#139;&#230;&#155;′&#229;¤&#154;&#231;&#189;&#145;&#229;&#157;&#128;&#227;&#128;&#130;</li>

  103.                                         <li>&#229;&#155;&#158;&#229;&#136;°é&#161;&#182;é&#131;¨é&#135;&#141;&#230;&#150;°&#229;&#143;&#145;èμ·&#230;&#144;&#156;&#231;′¢</li>

  104.                                         <li>&#229;|&#130;&#230;&#156;&#137;&#228;&#187;&#187;&#228;&#189;&#149;&#230;&#132;&#143;è§&#129;&#230;&#136;&#150;&#229;&#187;oè&#174;&#174;&#239;&#188;&#140;èˉ·&#229;&#143;&#138;&#230;&#151;&#182;<a >&#229;&#143;&#141;é|&#136;&#231;&#187;&#153;&#230;&#136;&#145;&#228;&#187;&#172;</a>&#227;&#128;&#130;</li>

  105.                                        



  106.                                 </ol>

  107.                         </div>

  108.                 </div>

  109.         </div>



  110. <div id="foot"><span class="foot_c">&#194;&#169;2015&nbsp;Baidu&nbsp;<span>&#230;-¤&#229;&#134;&#133;&#229;&#174;1&#231;3&#187;&#231;&#153;&#190;&#229;o|&#230;&#160;1&#230;&#141;&#174;&#230;&#130;¨&#231;&#154;&#132;&#230;&#140;&#135;&#228;&#187;¤è&#135;a&#229;&#138;¨&#230;&#144;&#156;&#231;′¢&#231;&#154;&#132;&#231;&#187;&#147;&#230;&#158;&#156;&#239;&#188;&#140;&#228;&#184;&#141;&#228;&#187;£è&#161;¨&#231;&#153;&#190;&#229;o|èμ&#158;&#230;&#136;&#144;è¢&#171;&#230;&#144;&#156;&#231;′¢&#231;&#189;&#145;&#231;&#171;&#153;&#231;&#154;&#132;&#229;&#134;&#133;&#229;&#174;1&#230;&#136;&#150;&#231;&#171;&#139;&#229;&#156;o</span></span>

  111. <span id="help"><a  target="_blank">&#228;&#184;&#190;&#230;&#138;¥</a></span></div>



  112. <div class="c-tips-container" id="c-tips-container"></div></div></div><div class="c-tips-container" id="c-tips-container"></div>



  113. </body></html>
  114. >>>
复制代码
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2019-1-22 22:36:38 | 显示全部楼层
看下我的笔记吧,希望有可以帮到你的
HTTP基础
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2019-1-22 23:00:51 | 显示全部楼层

还是没有明白。。。
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2019-1-29 22:09:59 | 显示全部楼层
网页请求分为get请求或是post请求,post请求你可以理解为发送了一串信息给网页,比如需要登录的网页就是用的post请求,发送给的信息就是我们输入的密码和账号。比如楼主你发的请求百度的链接用的request.post就是把data的数据发送给了百度,要求百度data里面的信息,你如果是用request.get则没有发送信息给百度,百度返回的是首页
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2019-1-31 10:27:29 | 显示全部楼层
mark一下,我也想知道,不知道楼上说的正确吗?因为百度好像只用get方法,不用post
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2019-2-9 11:47:36 | 显示全部楼层
data是上传到了百度的服务器,不是上传到百度网址的哪个地方。网页的作用是让用户更好的体验,它的背后也是数据的传输。看一下小甲鱼的《零基础学习web开发》就知道了。
你把返回的数据保存成一个网页文件,用浏览器打开。然后去百度首页输入框输入你刚刚提交的数据,对比两个网页就能知道的。
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-3-29 14:46

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表