python+requests实现接口测试 get 和post

        requests 是用Python语言编写,基于 urllib,采用 Apache2 Licensed 开源协议的 HTTP 库。它比 urllib 更加方便,可以节约我们大量的工作,完全满足 HTTP 测试需求。

        关于requests使用的博客不计其数,我这里不累赘摘录。只放上了我自己测试的脚本,用于需要使用requests是复制过来快速测试。


import requests
import time

def get_content_length(data):
    length = len(data.keys()) * 2 - 1
    total = ''.join(list(data.keys()) + list(data.values()))
    length += len(total)
    return length

if __name__ == '__main__':
    currenttime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
    print("currenttime is ", currenttime)

    #requestmode 1:get 2:post
    requestmode = 1
    if 1 == requestmode:
        print("test request get")
    else:
        print("test request post")

    if 1 == requestmode:
    # get
        url = 'https://www.baidu.com'
        headers = {
            "date": currenttime
        }
        print("headers: ", headers)
    elif 2 == requestmode:
    # post
        url = 'https://www.baidu.com'
        datas = {
            "date1": "data1value",
            "date2": "date2value"
         }
        print("datas: ", datas)
        datalength = str(get_content_length(datas))
        headers = {
            "Content-Type": "application/json;charset=utf-8",
            "Content-Length": datalength,
            "Date": currenttime
        }
        print("headers: ", headers)

    if 2 == requestmode:
        response = requests.post(url, headers=headers, data=datas)
    else:
        response = requests.get(url, headers=headers)
    # print(response.text)
    print(response.status_code)
    print("the status code is :", response.status_code)
    print("the web address is: ", response.url)
    print("the response headers is :", response.headers)
    print("the response content is :", response.content)


自测验证代码正确性:

测试request get

D:\Users\PycharmProjects\TEST\venv\Scripts\python.exe D:/Users/PycharmProjects/TEST/main.py
currenttime is  2022-01-07 22:07:13
test request get
headers:  {'date': '2022-01-07 22:07:13'}
200
the status code is : 200
the web address is:  https://www.baidu.com/
the response headers is : {'Cache-Control': 'private, no-cache, no-store, proxy-revalidate, no-transform', 'Connection': 'keep-alive', 'Content-Encoding': 'gzip', 'Content-Type': 'text/html', 'Date': 'Fri, 07 Jan 2022 14:07:13 GMT', 'Last-Modified': 'Mon, 23 Jan 2017 13:23:55 GMT', 'Pragma': 'no-cache', 'Server': 'bfe/1.0.8.18', 'Set-Cookie': 'BDORZ=27315; max-age=86400; domain=.baidu.com; path=/', 'Transfer-Encoding': 'chunked'}
the response content is : b'<!DOCTYPE html>\r\n<!--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=https://ss1.bdstatic.com/5eN1bjq8AAUYm2zgoY3K/r/www/cache/bdorz/baidu.min.css><title>\xe7\x99\xbe\xe5\xba\xa6\xe4\xb8\x80\xe4\xb8\x8b\xef\xbc\x8c\xe4\xbd\xa0\xe5\xb0\xb1\xe7\x9f\xa5\xe9\x81\x93</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=autofocus></span><span class="bg s_btn_wr"><input type=submit id=su value=\xe7\x99\xbe\xe5\xba\xa6\xe4\xb8\x80\xe4\xb8\x8b class="bg s_btn" autofocus></span> </form> </div> </div> <div id=u1> <a href=http://news.baidu.com name=tj_trnews class=mnav>\xe6\x96\xb0\xe9\x97\xbb</a> <a href=https://www.hao123.com name=tj_trhao123 class=mnav>hao123</a> <a href=http://map.baidu.com name=tj_trmap class=mnav>\xe5\x9c\xb0\xe5\x9b\xbe</a> <a href=http://v.baidu.com name=tj_trvideo class=mnav>\xe8\xa7\x86\xe9\xa2\x91</a> <a href=http://tieba.baidu.com name=tj_trtieba class=mnav>\xe8\xb4\xb4\xe5\x90\xa7</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>\xe7\x99\xbb\xe5\xbd\x95</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">\xe7\x99\xbb\xe5\xbd\x95</a>\');\r\n                </script> <a href=//www.baidu.com/more/ name=tj_briicon class=bri style="display: block;">\xe6\x9b\xb4\xe5\xa4\x9a\xe4\xba\xa7\xe5\x93\x81</a> </div> </div> </div> <div id=ftCon> <div id=ftConw> <p id=lh> <a href=http://home.baidu.com>\xe5\x85\xb3\xe4\xba\x8e\xe7\x99\xbe\xe5\xba\xa6</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/>\xe4\xbd\xbf\xe7\x94\xa8\xe7\x99\xbe\xe5\xba\xa6\xe5\x89\x8d\xe5\xbf\x85\xe8\xaf\xbb</a>&nbsp; <a href=http://jianyi.baidu.com/ class=cp-feedback>\xe6\x84\x8f\xe8\xa7\x81\xe5\x8f\x8d\xe9\xa6\x88</a>&nbsp;\xe4\xba\xacICP\xe8\xaf\x81030173\xe5\x8f\xb7&nbsp; <img src=//www.baidu.com/img/gs.gif> </p> </div> </div> </div> </body> </html>\r\n'

Process finished with exit code 0

测试request post

D:\Users\PycharmProjects\TEST\venv\Scripts\python.exe D:/Users/PycharmProjects/TEST/main.py
currenttime is  2022-01-07 22:09:41
test request post
datas:  {'date1': 'data1value', 'date2': 'date2value'}
headers:  {'Content-Type': 'application/json;charset=utf-8', 'Content-Length': '33', 'Date': '2022-01-07 22:09:41'}
302
the status code is : 302
the web address is:  https://www.baidu.com/
the response headers is : {'Connection': 'keep-alive', 'Content-Length': '17931', 'Content-Type': 'text/html', 'Date': 'Fri, 07 Jan 2022 14:09:40 GMT', 'Etag': '"54d97487-460b"', 'Server': 'bfe/1.0.8.18'}
the response content is : b'<html>\r\n<head>\r\n<meta http-equiv="content-type" content="text/html;charset=utf-8">\r\n<style data-for="result" id="css_result">\r\nbody{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}\r\n\r\n\r\n\r\n#foot{font-size:12px}.logo{width:117px;height:38px;cursor:pointer}\r\n\r\n#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}\r\n\r\n.fm{clear:both;position:relative;z-index:297}.nv a,.nv b,.btn,#page,#more{font-size:14px}\r\n\r\n.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}\r\n\r\n\r\n#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}\r\n\r\n#foot{height:20px;line-height:20px;color:#77c;background:#e6e6e6;text-align:center}#foot span{color:#666}\r\n\r\n.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}\r\n\r\n#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}\r\n\r\n\r\n#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}\r\n\r\n#result_logo{float:left;margin:11px 6px 0 6px}#result_logo img{width:104px}\r\n\r\n#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}\r\n#page{padding:0 0 0 138px;margin:30px 0 40px 0}\r\n\r\n\r\n#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}\r\n\r\n#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}\r\n\r\n#mCon{top:5px}\r\n\r\n.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}\r\n\r\n.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}\r\n\r\n.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")}\r\n\r\n\r\n\r\n</style>\r\n<meta http-equiv="X-UA-Compatible" content="IE=Edge">\r\n<title>\xe9\xa1\xb5\xe9\x9d\xa2\xe4\xb8\x8d\xe5\xad\x98\xe5\x9c\xa8_\xe7\x99\xbe\xe5\xba\xa6\xe6\x90\x9c\xe7\xb4\xa2</title>\r\n\r\n<style data-for="debug">\r\n\t#debug{display:none!important}\r\n</style>\r\n\r\n<style data-for="result" id="css_index_result">\r\n#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}\r\n.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}\r\n\r\n#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}\r\n\r\ninput::-ms-clear{display:none}\r\n</style>\r\n\r\n</head>\r\n\r\n<body link="#0000cc">\r\n<div id="wrapper" style="" class="wrapper_s">\r\n\r\n <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="\xe5\x88\xb0\xe7\x99\xbe\xe5\xba\xa6\xe9\xa6\x96\xe9\xa1\xb5" title="\xe5\x88\xb0\xe7\x99\xbe\xe5\xba\xa6\xe9\xa6\x96\xe9\xa1\xb5"> </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="\xe7\x99\xbe\xe5\xba\xa6\xe4\xb8\x80\xe4\xb8\x8b" class="bg s_btn"> </span><span class="tools"> <span id="mHolder"> <div id="mCon"> <span>\xe8\xbe\x93\xe5\x85\xa5\xe6\xb3\x95</span> </div> <ul id="mMenu"> <li><a href="javascript:;" name="ime_hw">\xe6\x89\x8b\xe5\x86\x99</a> </li> <li><a href="javascript:;" name="ime_py">\xe6\x8b\xbc\xe9\x9f\xb3</a> </li> <li class="ln"></li> <li><a href="javascript:;" name="ime_cl">\xe5\x85\xb3\xe9\x97\xad</a> </li> </ul> </span> <span class="shouji" style="display: none;"><a href="http://w.x.baidu.com/go/mini/8/10000020" onmousedown="return ns_c({\'fm\':\'behs\',\'tab\':\'bdbrowser\'})">\xe7\x99\xbe\xe5\xba\xa6\xe6\xb5\x8f\xe8\xa7\x88\xe5\x99\xa8\xef\xbc\x8c\xe6\x89\x93\xe5\xbc\x80\xe7\xbd\x91\xe9\xa1\xb5\xe5\xbf\xab2\xe7\xa7\x92\xef\xbc\x81</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>\xe7\xbd\x91\xe9\xa1\xb5</b> <a href="http://news.baidu.com/ns?cl=2&amp;rn=20&amp;tn=news&amp;word=" wdfield="word" onmousedown="return c({\'fm\':\'tab\',\'tab\':\'news\'})">\xe6\x96\xb0\xe9\x97\xbb</a><a href="http://tieba.baidu.com/f?kw=&amp;fr=wwwt" wdfield="kw" onmousedown="return c({\'fm\':\'tab\',\'tab\':\'tieba\'})">\xe8\xb4\xb4\xe5\x90\xa7</a><a href="http://zhidao.baidu.com/q?ct=17&amp;pn=0&amp;tn=ikaslist&amp;rn=10&amp;word=&amp;fr=wwwt" wdfield="word" onmousedown="return c({\'fm\':\'tab\',\'tab\':\'zhidao\'})">\xe7\x9f\xa5\xe9\x81\x93</a><a href="http://music.baidu.com/search?fr=ps&amp;key=" wdfield="key" onmousedown="return c({\'fm\':\'tab\',\'tab\':\'music\'})">\xe9\x9f\xb3\xe4\xb9\x90</a><a href="http://image.baidu.com/i?tn=baiduimage&amp;ps=1&amp;ct=201326592&amp;lm=-1&amp;cl=2&amp;nc=1&amp;word=" wdfield="word" onmousedown="return c({\'fm\':\'tab\',\'tab\':\'pic\'})">\xe5\x9b\xbe\xe7\x89\x87</a><a href="http://v.baidu.com/v?ct=301989888&amp;rn=20&amp;pn=0&amp;db=0&amp;s=25&amp;word=" wdfield="word" onmousedown="return c({\'fm\':\'tab\',\'tab\':\'video\'})">\xe8\xa7\x86\xe9\xa2\x91</a><a href="http://map.baidu.com/m?word=&amp;fr=ps01000" wdfield="word" onmousedown="return c({\'fm\':\'tab\',\'tab\':\'map\'})">\xe5\x9c\xb0\xe5\x9b\xbe</a><a href="http://wenku.baidu.com/search?word=&amp;lm=0&amp;od=0" wdfield="word" onmousedown="return c({\'fm\':\'tab\',\'tab\':\'wenku\'})">\xe6\x96\x87\xe5\xba\x93</a><a href="//www.baidu.com/more/" onmousedown="return c({\'fm\':\'tab\',\'tab\':\'more\'})">\xe6\x9b\xb4\xe5\xa4\x9a\xc2\xbb</a> </div>\r\n<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})">\xe6\x8a\x8a\xe7\x99\xbe\xe5\xba\xa6\xe8\xae\xbe\xe4\xb8\xba\xe4\xb8\xbb\xe9\xa1\xb5</a><a id="setf" href="http://www.baidu.com/cache/sethelp/index.html" onmousedown="return ns_c({\'fm\':\'behs\',\'tab\':\'favorites\',\'pos\':0})" target="_blank" style="display: inline;">\xe6\x8a\x8a\xe7\x99\xbe\xe5\xba\xa6\xe8\xae\xbe\xe4\xb8\xba\xe4\xb8\xbb\xe9\xa1\xb5</a><a onmousedown="return ns_c({\'fm\':\'behs\',\'tab\':\'tj_about\'})" href="http://home.baidu.com">\xe5\x85\xb3\xe4\xba\x8e\xe7\x99\xbe\xe5\xba\xa6</a><a onmousedown="return ns_c({\'fm\':\'behs\',\'tab\':\'tj_about_en\'})" href="http://ir.baidu.com">About Baidu</a> </p> <p id="cp">\xc2\xa92014&nbsp;Baidu&nbsp;<a href="/duty/" name="tj_duty">\xe4\xbd\xbf\xe7\x94\xa8\xe7\x99\xbe\xe5\xba\xa6\xe5\x89\x8d\xe5\xbf\x85\xe8\xaf\xbb</a>&nbsp;\xe4\xba\xacICP\xe8\xaf\x81030173\xe5\x8f\xb7&nbsp;<i class="c-icon-icrlogo"></i> </p> </div> </div>\r\n<div id="wrapper_wrapper" style="display: block;">\r\n\t<style>\r\n\t\t\t.nors{\r\n\t\t\t\tposition: relative;\r\n\t\t\t}\r\n\t\t\t.norsTitle{\r\n\t\t\t\tfont-size: 22px;\r\n\t\t\t\tfont-family: Microsoft Yahei;\r\n\t\t\t\tfont-weight: normal;\r\n\t\t\t\tcolor: #333;\r\n\t\t\t\tmargin: 35px 0 25px 0;\r\n\t\t\t}\r\n\t\t\t.norsSuggest {\r\n\t\t\t\tdisplay: inline-block;\r\n\t\t\t\tcolor:#333;\r\n\t\t\t\tfont-family:arial;\r\n\t\t\t\tfont-size: 13px;\r\n\t\t\t\tposition: relative;\r\n\t\t\t}\r\n\r\n\t\t\t.norsSuggest li{\r\n\t\t\t\tlist-style: decimal;\r\n\t\t\t}\r\n\t\t\t.norsTitle2 {\r\n\t\t\t\tfont-family: arial;\r\n\t\t\t\tfont-size: 13px;\r\n\t\t\t\tcolor: #666;\t\r\n\t\t\t}\r\n\t\t\t.norsSuggest li{\r\n\t\t\t\tmargin: 13px 0;\r\n\t\t\t}\r\n\t\t\t.norsSuggest ol{\r\n\t\t\t\tmargin-left: 47px;\r\n\t\t\t}\r\n\t\t\t#foot{\r\n\t\t\t\tposition: fixed;\r\n\t\t\t\t_position: absolute;\r\n\t\t\t\tbottom: 0;\r\n\t\t\t\twidth: 100%;\r\n\t\t\t\tclear: both;\r\n\t\t\t}\r\n\t</style>\r\n\t<div id="content_left">\r\n\t\t<div class="nors">\r\n\t\t\t<div class="norsSuggest">\r\n\t\t\t\t<h3 class="norsTitle">\xe5\xbe\x88\xe6\x8a\xb1\xe6\xad\x89\xef\xbc\x8c\xe6\x82\xa8\xe8\xa6\x81\xe8\xae\xbf\xe9\x97\xae\xe7\x9a\x84\xe9\xa1\xb5\xe9\x9d\xa2\xe4\xb8\x8d\xe5\xad\x98\xe5\x9c\xa8\xef\xbc\x81</h3>\r\n\t\t\t\t<p class="norsTitle2">\xe6\xb8\xa9\xe9\xa6\xa8\xe6\x8f\x90\xe7\xa4\xba\xef\xbc\x9a</p>\r\n\t\t\t\t<ol>\r\n\t\t\t\t\t<li>\xe8\xaf\xb7\xe6\xa3\x80\xe6\x9f\xa5\xe6\x82\xa8\xe8\xae\xbf\xe9\x97\xae\xe7\x9a\x84\xe7\xbd\x91\xe5\x9d\x80\xe6\x98\xaf\xe5\x90\xa6\xe6\xad\xa3\xe7\xa1\xae</li> \r\n\t\t\t\t\t<li>\xe5\xa6\x82\xe6\x9e\x9c\xe6\x82\xa8\xe4\xb8\x8d\xe8\x83\xbd\xe7\xa1\xae\xe8\xae\xa4\xe8\xae\xbf\xe9\x97\xae\xe7\x9a\x84\xe7\xbd\x91\xe5\x9d\x80\xef\xbc\x8c\xe8\xaf\xb7\xe6\xb5\x8f\xe8\xa7\x88<a href="http://www.baidu.com/more/index.html">\xe7\x99\xbe\xe5\xba\xa6\xe6\x9b\xb4\xe5\xa4\x9a</a>\xe9\xa1\xb5\xe9\x9d\xa2\xe6\x9f\xa5\xe7\x9c\x8b\xe6\x9b\xb4\xe5\xa4\x9a\xe7\xbd\x91\xe5\x9d\x80\xe3\x80\x82</li>\r\n\t\t\t\t\t<li>\xe5\x9b\x9e\xe5\x88\xb0\xe9\xa1\xb6\xe9\x83\xa8\xe9\x87\x8d\xe6\x96\xb0\xe5\x8f\x91\xe8\xb5\xb7\xe6\x90\x9c\xe7\xb4\xa2</li>\r\n\t\t\t\t\t<li>\xe5\xa6\x82\xe6\x9c\x89\xe4\xbb\xbb\xe4\xbd\x95\xe6\x84\x8f\xe8\xa7\x81\xe6\x88\x96\xe5\xbb\xba\xe8\xae\xae\xef\xbc\x8c\xe8\xaf\xb7\xe5\x8f\x8a\xe6\x97\xb6<a href="http://qingting.baidu.com/index">\xe5\x8f\x8d\xe9\xa6\x88\xe7\xbb\x99\xe6\x88\x91\xe4\xbb\xac</a>\xe3\x80\x82</li>\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t</ol>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\r\n<div id="foot"><span class="foot_c">\xc2\xa92015&nbsp;Baidu&nbsp;<span>\xe6\xad\xa4\xe5\x86\x85\xe5\xae\xb9\xe7\xb3\xbb\xe7\x99\xbe\xe5\xba\xa6\xe6\xa0\xb9\xe6\x8d\xae\xe6\x82\xa8\xe7\x9a\x84\xe6\x8c\x87\xe4\xbb\xa4\xe8\x87\xaa\xe5\x8a\xa8\xe6\x90\x9c\xe7\xb4\xa2\xe7\x9a\x84\xe7\xbb\x93\xe6\x9e\x9c\xef\xbc\x8c\xe4\xb8\x8d\xe4\xbb\xa3\xe8\xa1\xa8\xe7\x99\xbe\xe5\xba\xa6\xe8\xb5\x9e\xe6\x88\x90\xe8\xa2\xab\xe6\x90\x9c\xe7\xb4\xa2\xe7\xbd\x91\xe7\xab\x99\xe7\x9a\x84\xe5\x86\x85\xe5\xae\xb9\xe6\x88\x96\xe7\xab\x8b\xe5\x9c\xba</span></span>\r\n<span id="help"><a href="http://www.baidu.com/search/jubao.html" target="_blank">\xe4\xb8\xbe\xe6\x8a\xa5</a></span></div>\r\n\r\n<div class="c-tips-container" id="c-tips-container"></div></div></div><div class="c-tips-container" id="c-tips-container"></div>\r\n\r\n</body></html>'

Process finished with exit code 0

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值