main.py 626 B

12345678910111213141516171819202122
  1. #!/usr/bin/env python
  2. # -*- encoding: utf-8 -*-
  3. '''
  4. @Contact : liuyuqi.gov@msn.cn
  5. @Time : 2023/06/09 01:45:08
  6. @License : Copyright © 2017-2022 liuyuqi. All Rights Reserved.
  7. @Desc : enter point
  8. '''
  9. import configparser
  10. from crawl_meituan import Meituan
  11. def read_conf(config: configparser.ConfigParser):
  12. config.read('conf/config.ini', encoding='utf-8')
  13. if config.has_section('base'):
  14. cookie = config.get("base", "cookie",raw=True)
  15. return cookie
  16. if __name__=='__main__':
  17. config = configparser.ConfigParser()
  18. cookie =read_conf(config)
  19. meituan = Meituan(cookie)
  20. meituan.run()