-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pull request for crawler #5
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor fixes, once this is done please submit a PR
@@ -0,0 +1,39 @@ | |||
import os | |||
from hashlib import md5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file should possibly be called utils.py
|
||
from scrapy_ft_jobs_sites.settings import CRAWLER_DIR | ||
|
||
MAX_HASH_CHARS = 8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this to settings.py
@@ -37,10 +37,13 @@ def __init__(self, *args, **kwargs): | |||
self.start_urls.append(URL) | |||
|
|||
for pagination in range(10, 60, 10): | |||
URL = self.base_url_pattern + item.replace(" ", "+") + "&start=" + str(pagination) | |||
URL = self.base_url_pattern + \ | |||
item.replace(" ", "+") + "&start=" + str(pagination) | |||
self.start_urls.append(URL) | |||
|
|||
def parse_item(self, response): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure you have test case for parsing logic, this will help making sure our standard is enforced
Added crawler to cache Scrapy responses in crawler/services. This generic crawler will write all html response to disk.