1234567891011121314151617181920212223242526272829303132 |
- # import configparser
- # import os
- # config = configparser.ConfigParser()
- # # read config from conf/config.ini
- # def read_conf():
- # config.read(os.path.join("conf","config.ini"),encoding="utf-8")
- # if config.has_section('db'):
- # host = config['db']['host']
- # port = config['db']['port']
- # user = config['db']['user']
- # password = config['db']['password']
- # db = config['db']['db']
- # print(host, port, user, password, db)
- # return host, port, user, password, db
- # def write_conf():
- # # write config to conf/config.ini
- # config.add_section('db')
- # config.set('db', 'host', '122')
- # config.set('db', 'port', '333306')
- # config.write(open('conf/config.ini', 'w'))
- # read_conf()
- import re
- url = "https://h5.waimai.meituan.com/waimai/mindex/menu?mtShopId=1000088679487895&utm_source=&channel=default&source=shoplist&initialLat=39.940816&initialLng=116.444976&actualLat=39.940816&actualLng=116.444976"
- # get mtShopId
- mtShopId = re.findall(r"mtShopId=(\d+)", url)[0]
- print(mtShopId)
|