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] [Docs] CrawlSpider: update Rule docs #3712

Merged
merged 5 commits into from Jul 9, 2019

Conversation

@elacuesta
Copy link
Member

@elacuesta elacuesta commented Apr 1, 2019

Fixes #3711

More information at https://stackoverflow.com/q/55450472/939364

@codecov
Copy link

@codecov codecov bot commented Apr 1, 2019

Codecov Report

Merging #3712 into master will decrease coverage by 0.07%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3712      +/-   ##
==========================================
- Coverage   85.59%   85.52%   -0.08%     
==========================================
  Files         164      169       +5     
  Lines        9545     9830     +285     
  Branches     1430     1500      +70     
==========================================
+ Hits         8170     8407     +237     
- Misses       1128     1168      +40     
- Partials      247      255       +8
Impacted Files Coverage Δ
scrapy/selector/unified.py 93.75% <0%> (-6.25%) ⬇️
scrapy/utils/reqser.py 89.28% <0%> (-4.84%) ⬇️
scrapy/utils/gz.py 96% <0%> (-4%) ⬇️
scrapy/utils/response.py 85.41% <0%> (-3.22%) ⬇️
scrapy/core/scheduler.py 87.26% <0%> (-3.09%) ⬇️
scrapy/core/spidermw.py 97.53% <0%> (-2.47%) ⬇️
scrapy/utils/http.py 90.9% <0%> (-2.43%) ⬇️
scrapy/extensions/corestats.py 87.87% <0%> (-2.13%) ⬇️
scrapy/commands/check.py 24% <0%> (-1.36%) ⬇️
scrapy/cmdline.py 67.4% <0%> (-1.1%) ⬇️
... and 30 more

docs/topics/spiders.rst Outdated Show resolved Hide resolved
@elacuesta
Copy link
Member Author

@elacuesta elacuesta commented Apr 1, 2019

Also updated the callback description, to reflect that:

  • dict objects are also accepted
  • the output does not need to be a list.

docs/topics/spiders.rst Outdated Show resolved Hide resolved
:class:`~scrapy.http.Request` objects (or any subclass of them).
the specified link extractor. This callback receives a :class:`~scrapy.http.Response`
as its first argument and must return either a single instance or an iterable of
:class:`~scrapy.item.Item`, ``dict`` and/or :class:`~scrapy.http.Request` objects
Copy link
Member

@kmike kmike Apr 1, 2019

👍

@elacuesta elacuesta changed the title [Docs] CrawlSpider: add note about link text [Docs] CrawlSpider: update Rule docs Apr 1, 2019
the specified link extractor. This callback receives a :class:`~scrapy.http.Response`
as its first argument and must return either a single instance or an iterable of
:class:`~scrapy.item.Item`, ``dict`` and/or :class:`~scrapy.http.Request` objects
(or any subclass of them).
Copy link
Member

@Gallaecio Gallaecio Apr 2, 2019

I still wonder if we should mention link_text in the documentation about the callback, since users will most often need to access that meta field from their callback.

Copy link
Member Author

@elacuesta elacuesta Jul 9, 2019

I agree, but I was concerned about duplicating the same content. I ended up basically copying the same text from the previous part, but adding "As mentioned above" to make it clear that it's not an accidental duplication but an intended remark.

@kmike kmike changed the title [Docs] CrawlSpider: update Rule docs [MRG+1] [Docs] CrawlSpider: update Rule docs Jul 4, 2019
@kmike
Copy link
Member

@kmike kmike commented Jul 4, 2019

I think these changes are improvement to what we have in master, so +1 to merge them as-is.

kmike
kmike approved these changes Jul 4, 2019
@Gallaecio Gallaecio merged commit 68d898d into scrapy:master Jul 9, 2019
1 of 2 checks passed
@kmike kmike added this to the v1.7 milestone Jul 10, 2019
@elacuesta elacuesta deleted the docs_crawlspider_link_text branch Jul 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants