Skip to content
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

[MRG+1] Update broken Scrapy tutorial to use #2236

merged 3 commits into from Sep 15, 2016


Copy link

@stummjr stummjr commented Sep 13, 2016

Please, don't merge this yet because it's a WIP. For now, we have the old tutorial ported for, but we will now rewrite it.

This PR aims to fix #2233

Copy link

@codecov-io codecov-io commented Sep 14, 2016

Current coverage is 83.36% (diff: 100%)

Merging #2236 into master will not change coverage

Powered by Codecov. Last update 129421c...a9a96be

desc = sel.xpath('text()').extract()
print title, link, desc
for quote in response.xpath('//div[@class="quote"]'):
text = quote.xpath('span[@class="text"]/text()').extract()

This comment has been minimized.


eliasdorneles Sep 14, 2016

It would be nicer to use extract_first() here instead.


This comment has been minimized.


eliasdorneles Sep 14, 2016

It's a bit odd to say "From each code block" and then use response.xpath(), because it returns all quotes extracted in a list.
I realize this will be rewritten later, but to prevent from getting inconsistencies into master, we could use text like To get the text for each quote:

Copy link
Member Author

@stummjr stummjr commented Sep 14, 2016

@eliasdorneles eliasdorneles changed the title [WIP] Update broken Scrapy tutorial to use [MRG+1] Update broken Scrapy tutorial to use Sep 14, 2016
@redapple redapple merged commit 2f60f2a into scrapy:master Sep 15, 2016
3 checks passed
3 checks passed
codecov/patch Coverage not affected when comparing 129421c...a9a96be
codecov/project 83.36% (+0.00%) compared to 129421c
continuous-integration/travis-ci/pr The Travis CI build passed
Copy link

@redapple redapple commented Sep 15, 2016

Many thanks @stummjr and @eliasdorneles !

redapple added a commit that referenced this pull request Sep 15, 2016
[backport][1.1] Tutorial update (PR #2236)
This was referenced Sep 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants
You can’t perform that action at this time.