接口参数提取上下关联

# 用法 globals()["a"] = "用例a的返回结果"

# 用例b引用 b = globals()["a"] print(b)

import re
postid = re.findall(r"postid=(.+?)&", r2.url)
print postid  # 这里是list
# 提取为字符串
print postid[0]

posted @ 2019-09-26 17:54  千年妖狐  阅读(191)  评论(0编辑  收藏  举报