import re

'''
取值postid,左边界"post
'''
url="http://wwww.baidu.com/aspx?postid=6232&actiontip='保存成功'"
postid=re.findall(r"postid=(.*?)&",url)[0]
print(postid)
def findall_data(data,LB="",RB=""):
    rule=LB + r"(.+?)" + RB
    datalist=re.findall(rule,data)
    return  datalist
data1=findall_data(url,"postid=",'&')[0]
print(data1)

  

相关文章:

  • 2021-12-05
  • 2021-06-05
  • 2022-01-21
  • 2021-07-08
  • 2022-12-23
  • 2021-07-26
  • 2021-08-01
猜你喜欢
  • 2022-12-23
  • 2021-12-30
  • 2022-12-23
  • 2021-07-20
  • 2022-12-23
  • 2021-12-28
  • 2022-12-23
相关资源
相似解决方案