# -*- coding: utf-8 -*- import os import sys import platform from scrapy.cmdline import execute if platform.system() == "Windows": import asyncio asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) dirpath = os.path.dirname(os.path.abspath(__file__)) sys.path.append(dirpath) execute(['scrapy', 'crawl', 'pincong_spider', '-a', 'params={}']) # execute(['scrapy', 'crawl', 'zhihu_person', '-a', 'params={"pids":["tomtong-xue-48"]}']) # execute(['scrapy', 'crawl', 'mdc_tw', '-a', 'params={"proxy":"http://127.0.0.1:10809"}'])