# 用法 globals()["a"] = "用例a的返回结果"
# 用例b引用 b = globals()["a"] print(b)
import re
postid = re.findall(r"postid=(.+?)&", r2.url)
print postid # 这里是list
# 提取为字符串
print postid[0]
# 用法 globals()["a"] = "用例a的返回结果"
# 用例b引用 b = globals()["a"] print(b)
import re
postid = re.findall(r"postid=(.+?)&", r2.url)
print postid # 这里是list
# 提取为字符串
print postid[0]