示例#1
0
def run_spiders(site_ids):
    '''Run all the spiders belonging to the sites in `site_ids`.

    '''
    sites = [SITE_MODEL.objects.get(id=id)
             for id in site_ids]
    for site in sites:
        run_site_spider(site)
示例#2
0
    def handle(self, *args, **options):
        spider_name = args[0]

        site = SITE_MODEL.objects.get(spider_name=spider_name)

        run_site_spider(site)