摘要: python中requests库的post请求 4种类型参数 用python来验证接口正确性,主要流程有4步: 1 设置url 2 设置消息头 3 设置消息体 4 获取响应 5 解析相应 6 验证数据 Content-Type的格式有四种:分别是application/x-www-form-urle 阅读全文
posted @ 2021-08-31 16:03 逆光天涯客 阅读(2160) 评论(0) 推荐(0)
摘要: 1.例子 item['price'] = response.xpath('//span[@class="p-price"]/span[2]/text()').extract_first() 1.//开头表示如果我们不想定义它的父元素,就用//表示 2.匹配具体的属性值,这里是class=p-pric 阅读全文
posted @ 2021-08-29 23:23 逆光天涯客 阅读(205) 评论(0) 推荐(0)
摘要: 天气晴朗。 这是第一篇,没内容,充数的。 2021.08.29 阅读全文
posted @ 2021-08-29 23:13 逆光天涯客 阅读(10) 评论(0) 推荐(0)