-
-
Notifications
You must be signed in to change notification settings - Fork 388
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
Add Rio de Janeiro/RJ spider #29
Conversation
|
||
return items | ||
|
||
def create_gazette(self, date, url, is_extra_edition = False): |
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.
Just a small remark: PEP8 recommends no spaces around = sign when indicating default paramater value.
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.
Just opened an issue to discuss how we've been using Scrapy Contracts. In this case, considering our current patterns, we could just merge this branch without contracts.
Ready to be merged once #28 is on master (working locally).
This PR creates a spider to crawl gazettes from Rio de Janeiro.
I don't know how to test all possible flows using scrapy contracts.
For example:
no_gazette
for weekends and holidaysone_gazette
when no extra edition is publishedmultiple_gazettes
for extra editionsI thought about creating 3 functions, one for each case, and write the contract inside each callback function, but it seems overkill, doesn't it?
PS: this PR depends on #28