Basic structure to make sure the spider use an argument
This commit is contained in:
parent
2cb21c6b81
commit
4f5b66fff6
@ -3,9 +3,10 @@ from scrapy.spider import Spider
|
||||
class ChemspiderSpider(Spider):
|
||||
name = "Chemspider"
|
||||
allowed_domains = ["chemspider.com"]
|
||||
start_urls = (
|
||||
'http://www.chemspider.com/',
|
||||
)
|
||||
|
||||
def __init__(self, compound=None, *args, **kwargs):
|
||||
super(ChemspiderSpider, self).__init__(*args, **kwargs)
|
||||
self.start_urls = ["http://chemspiderapiurl/something/%s" % compound] #[TODO] - Give an logical start url.
|
||||
|
||||
def parse(self, response):
|
||||
pass
|
||||
|
@ -3,9 +3,10 @@ from scrapy.spider import Spider
|
||||
class WikipediaSpider(Spider):
|
||||
name = "Wikipedia"
|
||||
allowed_domains = ["wikipedia.org"]
|
||||
start_urls = (
|
||||
'http://www.wikipedia.org/',
|
||||
)
|
||||
|
||||
def __init__(self, compound=None, *args, **kwargs):
|
||||
super(WikipediaSpider, self).__init__(*args, **kwargs)
|
||||
self.start_urls = ["http://wikipediaurl/something/%s" % compound] #[TODO] - Give an logical start url.
|
||||
|
||||
def parse(self, response):
|
||||
pass
|
||||
|
Reference in New Issue
Block a user