Commit Graph

1800 Commits

Author SHA1 Message Date
Adrián Chaves 4759c68193 Address style issues 2022-06-30 16:57:17 +02:00
Adrián Chaves 983aa66687 Test ResponseTypes MIME types with the new implementation 2022-06-30 16:49:13 +02:00
Adrián Chaves 948b9ba125 Deprecate scrapy.responsetypes 2022-06-30 16:36:08 +02:00
Adrián Chaves 55105ddc7c Do not warn about internal usage of ResponseTypes.CLASSES 2022-06-30 16:29:18 +02:00
Adrián Chaves 54a0248301 Deprecate ResponseTypes.CLASSES 2022-06-30 16:24:42 +02:00
Adrián Chaves 1ea5a8e9e0 Deprecate ResponseTypes itself 2022-06-30 15:29:33 +02:00
Adrián Chaves fd2317bd6d Implement scrapy.utils.response.get_response_class 2022-06-30 15:15:52 +02:00
Adrián Chaves d2accf2e39 Fix issues reported by static checks 2022-06-21 12:02:56 +02:00
Adrián Chaves 3fc9b732cb Refactor responsetypes 2022-06-21 11:12:10 +02:00
Adrián Chaves 9044ceb824 Refactor responsetypes 2022-06-21 10:27:20 +02:00
Akshay Sharma 8340394bcc removed prints 2022-06-21 02:45:39 -04:00
Akshay Sharma ef6290ef1b url ending fix 2022-06-21 02:44:18 -04:00
Akshay Sharma 3e9efe26ce fix 2022-06-20 21:12:34 -04:00
Akshay Sharma 0eb1de90e2 fix static checks 2022-06-20 21:10:06 -04:00
Akshay Sharma bedd4e51e1
Merge branch 'master' into integrate-mime 2022-06-20 20:19:04 -04:00
Akshay Sharma b9effde875 Refactored _guess_content_type 2022-06-20 20:15:33 -04:00
Kromitvs 9e265a2c1f
Mind body to choose response class in cache, FTP and HTTP/1.0 (#4873) 2022-06-16 20:52:19 +02:00
Mikhail Korobov de0e2ccd7b
Merge pull request #5451 from FJMonteroInformatica/master
make test files follow HTML conventions
2022-06-12 00:46:45 +05:00
Laerte Pereira 6770d1ec62
chore(tests): Remove validations for unsupported modules versions 2022-06-09 09:08:09 -03:00
Laerte Pereira 407562b38b
Drop Python 3.6 support (#5514)
* chore: Drop Python 3.6 support

* Attend PR comments

* Tweak versions

* Update dependencies version

* fix: Ubuntu workflow

* fix windows workflow

* chore: Remove comment

* update `install_requires` dependencies versions

* move lxml to main pinned requirements

* Attend code-review comments

* remove non-pinned 3.7 from windows workflow

* simplify condition

* lint

* remove paragraph

* refactor

* remove leftover
2022-06-09 00:25:03 -03:00
Adrián Chaves c5627af15b
Centralize request fingerprints (#4524)
Co-authored-by: Mikhail Korobov <kmike84@gmail.com>
2022-06-07 18:44:54 +02:00
Mikhail Korobov 517cbc8d71
Merge pull request #5508 from mtabbasi/thumb_path-access-item
pass on item to thumb_path function as additional argument
2022-06-05 03:42:45 +05:00
Mikhail Korobov 99cddecd28
Merge pull request #5497 from AngelikiBoura/issue_3264/command_parser_unhandled_error
Issue #3264, fix error handling when spider is not matched
2022-05-28 13:26:23 +05:00
Mohammadtaher Abbasi 5c586d78f0 add tests 2022-05-25 23:58:09 +04:30
Andreas Tziortziortziopoulos b5c15d87ff [issue3264] Separate test for not matched spider to a url 2022-05-22 12:19:20 +03:00
Maxime Nannan 078622cfb0
Fix file expiration issue with GCS (#5318) 2022-05-20 08:30:06 +02:00
Akshay Sharma b2181d76d5 Merge branch 'master' of https://github.com/AKSHAYSHARMAJS/scrapy into integrate-mime 2022-05-08 17:48:57 -04:00
Andreas Tziortziortziopoulos 83c1939281 Issue #3264, fix error handling when spider is not matched
Changes
Implementation:
- Check whether Spider exists or is None, and if it's None skip execution of start_requests() with non existing Spider
Testing:
- Add a test case with invalid url inside test_command_parse
  Test proves that non-matched Spider does not throw an AttributeError
2022-05-06 03:59:30 +03:00
AngelikiBoura b2afcbfe2b
Fix typos in three files for Flake8 check (#5487)
* Fix typos in extensions files

Made some fixes in files memusage.py and statsmailer.py
in order to pass the flake8 check.

* Fix typos in twisted_reactor_custom_settings_same.py

A small change was needed in order for flake8 check
to pass.
2022-05-05 15:49:52 +02:00
FJMonteroInformatica 6a3f2ee687 HTML Conventions 2022-03-17 20:09:56 +01:00
Eugene 9a28eb0bad
Suggest installing the brotli package instead of brotlipy (#4267) 2022-03-17 05:39:54 +01:00
Adrián Chaves 50c8becbe0
Freeze and upgrade CI packages (#5429) 2022-03-01 17:29:08 +01:00
Adrián Chaves e865c4430e
Merge pull request from GHSA-mfjm-vh54-3f96
* Ignore cookies with a public suffix as domain unless it matches the request domain

* Fix the merge of 1.8.2 release notes

* Re-apply removal of tldextract restriction
2022-03-01 12:38:19 +01:00
Adrián Chaves 8ce01b3b76
Merge pull request from GHSA-cjvr-mfj7-j4j8
* Do not carry over cookies to a different domain on redirect

* Cover the cookie-domain redirect fix in the release notes

* Cover 1.8.2 in the release notes

* Fix redirect Cookie handling when the cookie middleware is disabled

* Update the 1.8.2 release date
2022-03-01 12:26:05 +01:00
Laerte Pereira befb6df119 Remove Python 2 code from WrappedRequest 2022-02-11 06:19:27 -03:00
Andrey Rahmatullin 5d7c0a5f86
Use toscrape.com instead of example.com in test_command_check. (#5407) 2022-02-10 10:50:12 +01:00
Alex e2e2ffd0d1
Move from optparse to argparse (#5374) 2022-02-09 20:52:07 +01:00
Andrey Rakhmatullin 1e1cfc26db Copy resource classes from twisted.web.test.test_webclient. 2022-02-08 21:01:16 +05:00
Laerte 4bda0976b2
Fix csviter call, add parse_rows test (#5394) 2022-02-08 14:57:19 +01:00
Eugenio Lacuesta fca49cca92
Remove deprecated DictItem class 2022-02-06 18:31:55 -03:00
Eugenio Lacuesta c8c1edd43b
Flake8 adjustments 2022-02-06 18:27:41 -03:00
Eugenio Lacuesta bbfa185664
Remove deprecated BaseItem class 2022-02-06 18:12:28 -03:00
Eugenio Lacuesta 55ae2109c9
Remove deprecated TextResponse.body_as_unicode 2022-02-05 13:11:13 -03:00
Laerte fe43411bc4
Fix TypeError on using pathlib.Path as key on FEEDS settings (#5384) 2022-02-04 09:57:57 +01:00
Sixuan (Cherie) Wu 30d5779ea9
Fix FEED_URI_PARAMS: custom params throws KeyError (#4966)
* fix FEED_URI_PARAMS: custom params throws KeyError closes #4962

* another try FEED_URI_PARAMS

* add warning message and change default function

* Add tests for FEED_URI_PARAMS

* FEED_URI_PARAMS: warn if the params dict has been modified in-place

* [Doc] FEED_URI_PARAMS: modifying params in-place is deprecated

* Remove whileline

* Rename parameters for lambda function

* Type hints for FeedExporter._get_uri_params

Co-authored-by: Adrián Chaves <adrian@chaves.io>
Co-authored-by: Eugenio Lacuesta <eugenio.lacuesta@gmail.com>
2022-01-28 14:30:30 -03:00
Georgiy Zatserklianyi 4bdaa54af4
response_httprepr memory issue fixed (#4972)
* response_httprepr replaced by response.body

* unused import deleted

* get_header_size function added

* response size calculation updated

* flake8 codestyle fix

* added counting status code, line breaks to response size

* get_status size: list to tuple, comments added

* test added: comparing new response size counting method with old `len(response_httprepr)`

* downloader stats : unreachable code deleted

* `get_status_size` optimized

* comment added

* tests.test_downloadermiddleware_stats: statement formatting updated

* scrapy.utils.response: `response_httprepr` -> deprecated

* tests.test_downloadermiddleware_stats: flake8 fix
2022-01-28 18:39:32 +05:00
Andrey Rakhmatullin 3577c00569 Merge remote-tracking branch 'origin/master' into crawler-process-reactor-later 2022-01-03 13:59:26 +05:00
Andrey Rahmatullin c5ab58056c
Set WindowsSelectorEventLoopPolicy on Windows (#5315) 2021-12-31 20:38:10 +01:00
Andrey Rakhmatullin d4565318c7 Fix a reactor test on Windows. 2021-12-23 17:40:31 +05:00
Andrey Rakhmatullin df04e934e6 Merge remote-tracking branch 'origin/master' into crawler-process-reactor-later 2021-12-23 17:25:56 +05:00