Created
August 18, 2014 17:42
-
-
Save nramirezuy/e05171a559d1b99caf66 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scrapy.spider import Spider | |
class SeveralNamesSpider(Spider): | |
def start_requests(self): | |
print 'name: {}, start_urls: {}'.format(self.name, self.start_urls) | |
for name, start_urls in (('name1', ('url1', )), ('name2', ('url2', ))): | |
globals()[name] = type(name, (SeveralNamesSpider, ), {'name': name, 'start_urls': start_urls}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment