知识点记录

1."xxx=aaa"的字符串转化为dict:dict(parse_sql("xxx=aaa"))

2.请求接口时禁止重定向:requests.post(url, data, allow_redirects=False)

3.302重定向时,headers里面的location是重定向的目标地址,可以用host+location确认完整url

4.查看所有重定向的历史:r.history,返回一个list的,里面是所有记录的Response数据,可以查看状态码,text等等

5.re匹配固定长度字符,re.findall("abc(.{10})", str)

posted @ 2019-04-21 18:49  雨之印迹  阅读(81)  评论(0编辑  收藏  举报