run.py 619 B

123456789101112131415161718192021
  1. #!/usr/bin/env python
  2. # -*- encoding: utf-8 -*-
  3. '''
  4. @Contact : liuyuqi.gov@msn.cn
  5. @Time : 2020/09/07 16:39:11
  6. @License : Copyright © 2017-2020 liuyuqi. All Rights Reserved.
  7. @Desc : 入口
  8. '''
  9. import crawl_car as cc
  10. site = r"https://sh.122.gov.cn/#/noticeDetail?fzjg=%E6%B2%AAA&tjyf=202007&fwdmgl=6003"
  11. chormepath = r"D:/Program-Files/browser-driver/chromedriver.exe"
  12. if __name__ == '__main__':
  13. crawler = cc.CrawlCar(
  14. site=site,
  15. save_folder='./data',
  16. browser=cc.BrowserType.CHROME,
  17. driver=chormepath # 驱动程序路径,firefox不需要
  18. )
  19. crawler.start()