标签:body port 需要 list tps import logs verify post
r2 = s.post(url2, data=body, verify=False)
# 获取当前url地址
print r2.url
# 第三步:正则提取需要的参数值
import re
postid = re.findall(r"postid=(.+?)&", r2.url)
print postid # 这里是list
# 提取为字符串
print postid[0]
# 第四步:删除草稿箱
url3 = "https://i.cnblogs.com/post/delete"
json3 = {"postId": postid[0]}
r3 = s.post(url3, json=json3, verify=False)
print r3.json()
标签:body port 需要 list tps import logs verify post
原文地址:https://www.cnblogs.com/yaohu/p/10304378.html