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

[GSoC 2019] Adds integration with Protego robots.txt parser. #3935

Merged
merged 5 commits into from Aug 27, 2019

Conversation

@anubhavp28
Copy link
Contributor

@anubhavp28 anubhavp28 commented Aug 3, 2019

[For Google Summer of Code 2019] Make Scrapy support Protego robots.txt parser.

@codecov
Copy link

@codecov codecov bot commented Aug 3, 2019

Codecov Report

Merging #3935 into master will decrease coverage by 0.15%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #3935      +/-   ##
==========================================
- Coverage   85.54%   85.39%   -0.16%     
==========================================
  Files         166      167       +1     
  Lines        9681     9720      +39     
  Branches     1445     1455      +10     
==========================================
+ Hits         8282     8300      +18     
- Misses       1146     1162      +16     
- Partials      253      258       +5
Impacted Files Coverage Δ
scrapy/robotstxt.py 97.36% <100%> (+0.64%) ⬆️
scrapy/core/downloader/handlers/s3.py 62.9% <0%> (-32.26%) ⬇️
scrapy/utils/boto.py 46.66% <0%> (-26.67%) ⬇️
scrapy/core/downloader/tls.py 86.04% <0%> (-2.85%) ⬇️
scrapy/core/scraper.py 86.48% <0%> (-2.03%) ⬇️
scrapy/extensions/feedexport.py 81.65% <0%> (-1.84%) ⬇️
scrapy/pipelines/files.py 65.38% <0%> (-1.16%) ⬇️
scrapy/utils/project.py 75.43% <0%> (-0.93%) ⬇️
scrapy/http/request/__init__.py 100% <0%> (ø) ⬆️
scrapy/utils/curl.py 100% <0%> (ø)
... and 5 more

scrapy/robotstxt.py Outdated Show resolved Hide resolved
@Gallaecio
Copy link
Member

@Gallaecio Gallaecio commented Aug 12, 2019

Github references can now point to https://github.com/anubhavp28/protego

Note: I’m delaying a proper review until scrapy/protego#1 is merged and a release with it published in PyPI.

exc_info=sys.exc_info(),
extra={'spider': self.spider})
robotstxt_body = ''
robotstxt_body = decode_robotstxt(robotstxt_body, spider, True)
Copy link
Member

@kmike kmike Aug 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please use keyword argument to pass boolean value (True), to make code more readable - here and in other places?



class ProtegoRobotParserTest(BaseRobotParserTest, unittest.TestCase):
if not rerp_available():
Copy link
Member

@kmike kmike Aug 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should check for protego, not for rerp

kmike
kmike approved these changes Aug 20, 2019
Copy link
Member

@kmike kmike left a comment

I haven't tried running the code, but the code itself looks good to me, thanks @anubhavp28! +1 to merge.

@anubhavp28 anubhavp28 changed the title Adds integration with Protego robots.txt parser. [GSoC 2019] Adds integration with Protego robots.txt parser. Aug 22, 2019
@Gallaecio Gallaecio merged commit 3a7b949 into scrapy:master Aug 27, 2019
1 check passed
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.

None yet

3 participants