import os import sys # -*- coding: utf-8 -*- from scrapy.cmdline import execute dirpath = os.path.dirname(os.path.abspath(__file__)) sys.path.append(dirpath) if __name__ == "__main__": execute(['scrapy', 'crawl', 'api_common', '-a', 'params={}']) # execute(['scrapy', 'crawl', 'usc_history', '-a', 'params={"proxy": "http://127.0.0.1:10809"}'])