-
-
Save domingos86/4c44da54a91a1a03da19629d28872ab5 to your computer and use it in GitHub Desktop.
Spider template that loads listing ids
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
class IdSpider(Spider): | |
def __init__(self): | |
self.ids = set() | |
try: | |
with open('data/' + self.name + '_ids', 'rb') as f: | |
for line in f: | |
self.ids.add(line.strip()) | |
except: | |
pass | |
super(Spider, self).__init__() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment