AI Slop Code RIsk Monitor

scrapy/scrapy

Scrapy, a fast high-level web crawling & scraping framework for Python.

27.8 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for scrapy/scrapy, a Python project with 64,711 GitHub stars. SynthScan examined 106,238 lines of code across 567 source files, recording 2459 pattern matches distributed across 18 syntactic categories. The legacy adjusted pattern signal is 27.8 (Elevated pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

27.8
Adjusted Signal
27.8
Raw Pattern Score
100%
Time Factor
2026-10-09
Last Push
64.7K
Stars
Python
Language
106.2K
Lines of Code
567
Files
2.5K
Pattern Hits
2026-10-12
Scan Date
0.16
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 54.1/100 · HIGH

Can maintainers explain intent, assumptions, and trade-offs? 1694 finding(s).

Hallucinated Dependency & Supply Chain Risk 31.2/100 · MEDIUM

Are imports declared and package/API names verified? 482 finding(s).

Agent Over-Engineering Ratio 62.3/100 · HIGH

Are wrappers, guards, and repeated structures necessary? 1901 finding(s).

PR Review Velocity Impact 76.9/100 · CRITICAL

Which changes need focused human review? 2459 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 5HIGH 86MEDIUM 90LOW 2278

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 2459 distinct pattern matches across 18 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers1607 hits · 1558 pts
SeverityFileLineSnippetContext
LOWconftest.py181def pytest_collection_modifyitems(items):CODE
LOWtests/test_request_dict.py114def test_callback_serialization(spider: MethodsSpider) -> None:CODE
LOWtests/test_request_dict.py123def test_reference_callback_serialization(spider: MethodsSpider) -> None:CODE
LOWtests/test_request_dict.py135def test_private_reference_callback_serialization(spider: MethodsSpider) -> None:CODE
LOW⚡tests/test_request_dict.py147def test_private_callback_serialization(spider: MethodsSpider) -> None:CODE
LOW⚡tests/test_request_dict.py156def test_mixin_private_callback_serialization(spider: MethodsSpider) -> None:CODE
LOW⚡tests/test_request_dict.py165def test_delegated_callback_serialization(spider: MethodsSpider) -> None:CODE
LOWtests/test_request_dict.py204def test_callback_not_available() -> None:CODE
LOWtests/test_utils_signal.py57 async def test_send_catch_log_dont_log(CODE
LOWtests/test_utils_signal.py162 def test_error_logged_if_deferred_not_supported(CODE
LOWtests/test_http_response_text.py179 def test_declared_encoding_invalid(self):CODE
LOWtests/test_http_response_text.py189 def test_body_inferred_encoding_of_undeclared_legacy_page(self):CODE
LOWtests/test_http_response_text.py218 def test_bom_is_removed_from_body(self):CODE
LOWtests/test_http_response_text.py245 def test_replace_wrong_encoding(self):CODE
LOWtests/test_http_response_text.py288 def test_selector_response_refcounting(self):CODE
LOWtests/test_http_response_text.py313 def test_selector_shortcuts_kwargs(self):CODE
LOWtests/test_http_response_text.py334 def test_urljoin_with_base_url(self):CODE
LOW⚡tests/test_http_response_text.py393 def test_follow_selector_list(self):CODE
LOW⚡tests/test_http_response_text.py398 def test_follow_selector_invalid(self):CODE
LOW⚡tests/test_http_response_text.py403 def test_follow_selector_attribute(self):CODE
LOW⚡tests/test_http_response_text.py408 def test_follow_selector_no_href(self):CODE
LOW⚡tests/test_http_response_text.py416 def test_follow_whitespace_selector(self):CODE
LOWtests/test_http_response_text.py466 def test_follow_all_css_skip_invalid(self):CODE
LOWtests/test_http_response_text.py487 def test_follow_all_xpath_skip_invalid(self):CODE
LOWtests/test_http_response_text.py504 def test_follow_all_too_many_arguments(self):CODE
LOWtests/test_http_response_text.py534 def test_json_response_wrong_charset(self):CODE
LOWtests/test_http_response_text.py647 def test_selector_shortcuts_kwargs(self):CODE
LOW⚡tests/test_contracts.py697 def test_unregistered_at_line_is_not_a_tested_method(self):CODE
LOW⚡tests/test_contracts.py705 def test_unregistered_at_line_is_skipped(self):CODE
LOW⚡tests/test_contracts.py712 def test_unregistered_at_line_does_not_break_checks(self):CODE
LOWtests/test_contracts.py114 def returns_request_cb_kwargs(self, response, url):CODE
LOWtests/test_contracts.py130 def returns_item_cb_kwargs_error_unexpected_keyword(self, response):CODE
LOWtests/test_contracts.py138 def returns_item_cb_kwargs_error_missing_argument(self, response, arg):CODE
LOWtests/test_contracts.py159 def returns_request_range_fail(self, response):CODE
LOWtests/test_contracts.py242 def scrapes_multiple_missing_fields(self, response):CODE
LOWtests/test_contracts.py266 def invalid_regex_with_valid_contract(self, response):CODE
LOWtests/test_contracts.py290 def returns_error_missing_meta(self, response):CODE
LOWtests/test_contracts.py566 def test_returns_async_gen_sync(self):CODE
LOWtests/test_contracts.py583 def test_returns_invalid_argument_count(self):CODE
LOWtests/test_contracts.py590 def test_returns_default_bounds(self):CODE
LOWtests/test_contracts.py605 def test_returns_and_scrapes_ignore_other_types(self):CODE
LOWtests/test_contracts.py615 def test_multiple_urls_and_batches(self):CODE
LOWtests/test_contracts.py802 def test_custom_tagged_request_contract(self):CODE
LOWtests/test_contracts.py874 def test_pre_hook_keyboard_interrupt(self):CODE
LOWtests/test_contracts.py888 def test_post_hook_keyboard_interrupt(self):CODE
LOWtests/test_contracts.py915 def test_pre_hook_assertion_failure(self):CODE
LOWtests/test_contracts.py941 async def test_pre_hook_async_callback(self):CODE
LOWtests/test_contracts.py955 async def test_pre_hook_async_generator(self):CODE
LOWtests/test_contracts.py969 async def test_post_hook_async_generator(self):CODE
LOWtests/test_contracts.py1002def test_hook_override_deprecation():CODE
LOWtests/test_contracts.py1007def test_no_hook_override_deprecation(recwarn):CODE
LOWtests/test_command_parse.py116 def parse_request_with_cb_kwargs(self, response, foo=None, key=None):CODE
LOWtests/test_command_parse.py122 def parse_request_without_meta(self, response):CODE
LOWtests/test_command_parse.py518 def test_crawlspider_matching_rule_default_callback(CODE
LOWtests/test_command_parse.py532 def test_spider_with_no_rules_attribute(CODE
LOWtests/test_command_parse.py547 def test_crawlspider_missing_callback(CODE
LOWtests/test_command_parse.py560 def test_crawlspider_no_matching_rule(CODE
LOWtests/test_command_parse.py575 def test_crawlspider_not_exists_with_not_matched_url(CODE
LOWtests/test_command_parse.py307 def test_request_with_cb_kwargs(STRING
LOWtests/test_command_parse.py329 def test_request_without_meta(STRING
1547 more matches not shown…
Unused Imports412 hits · 403 pts
SeverityFileLineSnippetContext
LOWconftest.py1CODE
LOWtests/test_request_dict.py1CODE
LOWtests/test_utils_signal.py1CODE
LOWtests/test_http_response_text.py1CODE
LOWtests/test_contracts.py1CODE
LOWtests/test_command_parse.py1CODE
LOWtests/test_logstats.py1CODE
LOWtests/test_utils_template.py1CODE
LOWtests/test_command_genspider.py1CODE
LOWtests/test_extension_remote_control.py1CODE
LOWtests/test_utils_datatypes.py1CODE
LOWtests/test_engine.py1CODE
LOWtests/test_selector.py1CODE
LOWtests/test_zz_resources.py3CODE
LOWtests/test_spidermiddleware.py1CODE
LOWtests/test_utils_benchserver.py1CODE
LOWtests/test_utils_benchserver.py9CODE
LOWtests/test_scrapy__getattr__.py1CODE
LOWtests/test_extension_debug.py1CODE
LOWtests/test_downloader_handler_twisted_http11.py1CODE
LOWtests/test_downloader_handler_twisted_http11.py50CODE
LOWtests/test_stats.py1CODE
LOWtests/test_linkextractors.py1CODE
LOWtests/test_command_runspider.py1CODE
LOWtests/test_engine_close_spider.py1CODE
LOWtests/test_engine_close_spider.py18CODE
LOWtests/test_loader.py1CODE
LOWtests/test_middleware.py1CODE
LOWtests/test_http_request_json.py1CODE
LOWtests/test_http2_client_protocol.py1CODE
LOWtests/test_utils_iterators.py1CODE
LOWtests/test_dependencies.py1CODE
LOWtests/test_feedexport_async.py3CODE
LOWtests/test_poet.py3CODE
LOWtests/test_signals.py1CODE
LOWtests/test_utils_log.py1CODE
LOWtests/test_link.py1CODE
LOWtests/test_spider_sitemap.py1CODE
LOWtests/test_spidermiddleware_urllength.py1CODE
LOWtests/test_downloader_handler_twisted_http2.py3CODE
LOWtests/test_feedexport_postprocess.py1CODE
LOWtests/test_feedexport_uri_params.py1CODE
LOWtests/test_spidermiddleware_referer.py1CODE
LOWtests/test_utils_asyncgen.py1CODE
LOWtests/test_downloader_handler_aiohttp.py1CODE
LOWtests/spiders.py5CODE
LOWtests/test_downloadermiddleware_stats.py1CODE
LOWtests/test_utils_project.py1CODE
LOWtests/test_downloadermiddleware_robotstxt.py1CODE
LOWtests/test_crawler_subprocess.py1CODE
LOWtests/test_robotstxt_interface.py1CODE
LOWtests/test_command_genrequest.py1CODE
LOWtests/test_dupefilters.py1CODE
LOWtests/test_engine_stop_download_bytes.py1CODE
LOWtests/test_http_request_form.py1CODE
LOWtests/test_utils_trackref.py1CODE
LOWtests/test_pipelines.py1CODE
LOWtests/test_core_downloader.py1CODE
LOWtests/test_core_downloader.py59CODE
LOWtests/test_core_downloader.py61CODE
352 more matches not shown…
Cross-Language Confusion54 hits · 328 pts
SeverityFileLineSnippetContext
HIGHtests/test_squeues_request.py54 q.push(req)CODE
HIGHtests/test_squeues_request.py71 q.push(req)CODE
HIGH⚡tests/test_squeues_request.py83 q.push(req1)CODE
HIGH⚡tests/test_squeues_request.py84 q.push(req2)CODE
HIGH⚡tests/test_squeues_request.py85 q.push(req3)CODE
HIGHtests/test_squeues_request.py242 queue.push(Request("https://toscrape.com"))CODE
HIGH⚡tests/test_pqueues.py65 queue.push(req1)CODE
HIGH⚡tests/test_pqueues.py66 queue.push(req2)CODE
HIGH⚡tests/test_pqueues.py67 queue.push(req3)CODE
HIGH⚡tests/test_pqueues.py114 queue.push(req1)CODE
HIGH⚡tests/test_pqueues.py115 queue.push(req2)CODE
HIGH⚡tests/test_pqueues.py116 queue.push(req3)CODE
HIGH⚡tests/test_pqueues.py138 queue.push(Request("https://example.org/1", meta={"is_start_request": True}))CODE
HIGH⚡tests/test_pqueues.py139 queue.push(Request("https://example.org/2", priority=1))CODE
HIGH⚡tests/test_pqueues.py175 queue.push(req1)CODE
HIGH⚡tests/test_pqueues.py176 queue.push(req2)CODE
HIGH⚡tests/test_pqueues.py177 queue.push(req3)CODE
HIGH⚡tests/test_pqueues.py192 queue.push(req1)CODE
HIGH⚡tests/test_pqueues.py193 queue.push(req2)CODE
HIGH⚡tests/test_pqueues.py194 queue.push(req3)CODE
HIGHtests/test_pqueues.py48 queue.push(req1)CODE
HIGHtests/test_pqueues.py90 queue.push(req)CODE
HIGHtests/test_pqueues.py221 queue.push(request)CODE
HIGHtests/test_pqueues.py247 queue.push(request)CODE
HIGHtests/test_pqueues.py269 queue.push(req)CODE
HIGHtests/test_pqueues.py281 queue.push(req)CODE
HIGHtests/test_pqueues.py299 queue.push(request)CODE
HIGHtests/test_pqueues.py305 queue.push(request)CODE
HIGHtests/test_pqueues.py354 queue.push(request)CODE
HIGHtests/test_scheduler.py432 self._queue.push(request)CODE
HIGH⚡tests/test_squeues.py77 q.push(lambda x: x)CODE
HIGH⚡tests/test_squeues.py83 q.push(sel)CODE
HIGH⚡tests/test_squeues.py93 q.push("a")CODE
HIGH⚡tests/test_squeues.py94 q.push(123)CODE
HIGH⚡tests/test_squeues.py95 q.push({"a": "dict"})CODE
HIGH⚡tests/test_squeues.py136 q.push(i)CODE
HIGH⚡tests/test_squeues.py145 q.push(loader)CODE
HIGH⚡tests/test_squeues.py156 q.push(r)CODE
HIGHtests/test_squeues.py169 q.push(lambda x: x)CODE
HIGHtests/test_squeues.py178 q.push(sel)CODE
HIGH⚡tests/test_squeues.py205 q.push("a")CODE
HIGH⚡tests/test_squeues.py206 q.push(123)CODE
HIGH⚡tests/test_squeues.py207 q.push({"a": "dict"})CODE
HIGH⚡tests/test_squeues.py228 q.push(i)CODE
HIGH⚡tests/test_squeues.py237 q.push(loader)CODE
HIGH⚡tests/test_squeues.py248 q.push(r)CODE
HIGHtests/test_settings/__init__.py967 {"FOO": '{"tests.test_settings.Component1": null}'},CODE
HIGHscrapy/pqueues.py232 q.push(request) # this may fail (eg. serialization error)CODE
HIGHscrapy/pqueues.py487 queue.push(request)CODE
HIGHscrapy/core/scheduler.py450 self.dqs.push(request)STRING
HIGHscrapy/core/scheduler.py473 self.mqs.push(request)STRING
HIGHscrapy/extensions/remote_control.py68 - ``start_time`` (number or null): the start time of the Scrapy processSTRING
HIGHscrapy/extensions/remote_control.py87 - ``traceback`` (string or null): the traceback if an exception wasSTRING
HIGHscrapy/spidermiddlewares/referer.py79 If url is null, return no referrer.STRING
Empty Error Handlers29 hits · 145 pts
SeverityFileLineSnippetContext
HIGHtests/test_crawler_runners.py119except ValueError:CODE
HIGHtests/test_crawler_runners.py132except ValueError:CODE
HIGHtests/CrawlerProcess/asyncio_enabled_reactor.py17except RuntimeError:CODE
HIGHtests/CrawlerProcess/asyncio_enabled_reactor.py24except RuntimeError:CODE
HIGHtests/AsyncCrawlerProcess/asyncio_enabled_reactor.py16except RuntimeError:CODE
HIGHscrapy/pqueues.py240except KeyError:CODE
HIGHscrapy/cmdline.py179except KeyError:CODE
HIGHscrapy/exporters.py320except TypeError: # list in value may not contain stringsCODE
HIGHscrapy/crawler.py1204except asyncio.CancelledError:CODE
HIGHscrapy/core/downloader/handlers/_httpx.py61except ImportError: # pragma: no coverCODE
HIGHscrapy/core/downloader/handlers/_httpx.py69except ImportError: # pragma: no coverCODE
HIGHscrapy/core/_http2/protocol.py413except KeyError:CODE
HIGHscrapy/core/_http2/protocol.py421except KeyError:CODE
HIGHscrapy/core/_http2/protocol.py440except KeyError:CODE
HIGHscrapy/core/_http2/protocol.py448except KeyError:CODE
HIGHscrapy/utils/reactor.py44except error.CannotListenError:CODE
HIGHscrapy/utils/_shell.py85except ImportError:CODE
HIGHscrapy/utils/_shell.py143except SystemExit: # raised when using exit() in python code.interactCODE
HIGHscrapy/utils/_shell.py43except RuntimeError:CODE
HIGHscrapy/utils/log.py215except ImportError:CODE
HIGHscrapy/utils/_datatypes.py35except KeyError:CODE
HIGHscrapy/extensions/debug.py36except AttributeError:CODE
HIGHscrapy/extensions/httpcache.py156except ValueError:CODE
HIGHscrapy/extensions/httpcache.py242except ValueError:CODE
HIGHscrapy/http/cookies.py122except ValueError:CODE
HIGHscrapy/http/request/form.py307except IndexError:CODE
HIGHscrapy/spidermiddlewares/referer.py418except ValueError:CODE
HIGHscrapy/commands/genspider.py207except KeyError:CODE
HIGHscrapy/commands/__init__.py192except ImportError:CODE
Dead Code68 hits · 136 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_engine.py310CODE
MEDIUMtests/test_spidermiddleware.py81CODE
MEDIUMtests/spiders.py698CODE
MEDIUMtests/test_utils_python.py42CODE
MEDIUMtests/test_crawler.py247CODE
MEDIUMtests/test_crawler.py325CODE
MEDIUMtests/test_crawler.py403CODE
MEDIUMtests/test_crawler.py481CODE
MEDIUMtests/test_crawler.py595CODE
MEDIUMtests/test_engine_loop.py370CODE
MEDIUMtests/test_engine_loop.py412CODE
MEDIUMtests/test_engine_loop.py472CODE
MEDIUMtests/AsyncCrawlerRunner/reactorless_simple.py15CODE
MEDIUMtests/AsyncCrawlerRunner/custom_loop_same.py20CODE
MEDIUMtests/AsyncCrawlerRunner/reactorless_custom_settings.py18CODE
MEDIUMtests/AsyncCrawlerRunner/custom_loop_different.py20CODE
MEDIUMtests/AsyncCrawlerRunner/multi_parallel.py15CODE
MEDIUMtests/AsyncCrawlerRunner/reactorless_reactor.py14CODE
MEDIUMtests/AsyncCrawlerRunner/no_reactor.py13CODE
MEDIUMtests/AsyncCrawlerRunner/simple_default_reactor.py14CODE
MEDIUMtests/AsyncCrawlerRunner/simple.py17CODE
MEDIUMtests/AsyncCrawlerRunner/multi_seq.py15CODE
MEDIUMtests/CrawlerProcess/asyncio_enabled_no_reactor.py17CODE
MEDIUMtests/CrawlerProcess/args_settings.py19CODE
MEDIUMtests/CrawlerProcess/reactor_select.py15CODE
MEDIUMtests/CrawlerProcess/multi.py10CODE
MEDIUMtests/CrawlerProcess/asyncio_enabled_reactor.py53CODE
MEDIUM…ts/CrawlerProcess/asyncio_enabled_reactor_same_loop.py22CODE
MEDIUMtests/CrawlerProcess/reactor_settings.py24CODE
MEDIUM…awlerProcess/reactor_default_twisted_reactor_select.py13CODE
MEDIUM…awlerProcess/asyncio_enabled_reactor_different_loop.py20CODE
MEDIUM…cess/reactor_select_subclass_twisted_reactor_select.py22CODE
MEDIUMtests/CrawlerProcess/dns_resolver_deprecated.py13CODE
MEDIUMtests/CrawlerProcess/reactor_default.py13CODE
MEDIUMtests/CrawlerProcess/simple.py12CODE
MEDIUM…rawlerProcess/reactor_select_twisted_reactor_select.py14CODE
MEDIUMtests/CrawlerProcess/asyncio_custom_loop.py10CODE
MEDIUMtests/CrawlerRunner/explicit_default_reactor.py17CODE
MEDIUMtests/CrawlerRunner/custom_loop_same.py19CODE
MEDIUMtests/CrawlerRunner/change_reactor.py15CODE
MEDIUMtests/CrawlerRunner/custom_loop_different.py19CODE
MEDIUMtests/CrawlerRunner/multi_parallel.py14CODE
MEDIUMtests/CrawlerRunner/no_reactor.py13CODE
MEDIUMtests/CrawlerRunner/simple.py16CODE
MEDIUMtests/CrawlerRunner/multi_seq.py15CODE
MEDIUMtests/AsyncCrawlerProcess/asyncio_enabled_no_reactor.py17CODE
MEDIUMtests/AsyncCrawlerProcess/reactorless_simple.py12CODE
MEDIUM…erProcess/asyncio_enabled_reactor_same_loop_default.py21CODE
MEDIUMtests/AsyncCrawlerProcess/args_settings.py19CODE
MEDIUM…syncCrawlerProcess/reactorless_import_hook_multiple.py21CODE
MEDIUM…sts/AsyncCrawlerProcess/reactorless_custom_settings.py23CODE
MEDIUMtests/AsyncCrawlerProcess/multi.py10CODE
MEDIUMtests/AsyncCrawlerProcess/asyncio_enabled_reactor.py43CODE
MEDIUM…yncCrawlerProcess/asyncio_enabled_reactor_same_loop.py21CODE
MEDIUMtests/AsyncCrawlerProcess/reactor_settings.py24CODE
MEDIUM…ncCrawlerProcess/reactorless_telnetconsole_disabled.py10CODE
MEDIUM…ocess/asyncio_custom_loop_custom_settings_different.py13CODE
MEDIUM…lerProcess/asyncio_custom_loop_custom_settings_same.py13CODE
MEDIUM…awlerProcess/asyncio_enabled_reactor_different_loop.py19CODE
MEDIUM…yncCrawlerProcess/reactorless_telnetconsole_enabled.py10CODE
8 more matches not shown…
Modern Structural Boilerplate112 hits · 113 pts
SeverityFileLineSnippetContext
LOWtests/test_scheduler.py131 def _setup(scheduler: Scheduler) -> None:CODE
LOWtests/test_scheduler.py144 def _setup(scheduler: Scheduler) -> None:CODE
LOWtests/test_scheduler.py159 def _setup(scheduler: Scheduler) -> None:CODE
LOWtests/test_scheduler.py300 def _setup(scheduler: Scheduler) -> None:CODE
LOWtests/test_extension_periodic_log.py71 def set_a(self) -> None:CODE
LOWtests/test_extension_periodic_log.py74 def set_b(self) -> None:CODE
LOWtests/test_commands.py220logger = logging.getLogger(__name__)CODE
LOWtests/test_feedexport_mode.py54 def _setup(self, mockserver: MockServer, tmp_path: Path) -> None:CODE
LOWtests/test_crawler.py859 def update_settings(self, settings: Settings) -> None:CODE
LOW…syncCrawlerProcess/reactorless_import_hook_multiple.py8logger = logging.getLogger(__name__)CODE
LOW…yncCrawlerProcess/reactorless_import_hook_uninstall.py8logger = logging.getLogger(__name__)CODE
LOWscrapy/mail.py38logger = logging.getLogger(__name__)CODE
LOWscrapy/robotstxt.py18logger = logging.getLogger(__name__)CODE
LOWscrapy/addons.py15logger = logging.getLogger(__name__)CODE
LOWscrapy/pqueues.py18logger = logging.getLogger(__name__)CODE
LOWscrapy/pqueues.py267 def _update_curprio(self) -> None:CODE
LOWscrapy/__init__.py15__all__ = [CODE
LOWscrapy/statscollectors.py21logger = logging.getLogger(__name__)CODE
LOWscrapy/statscollectors.py64 def set_value(self, key: str, value: Any, spider: Spider | None = None) -> None:CODE
LOWscrapy/statscollectors.py68 def set_stats(self, stats: StatsT, spider: Spider | None = None) -> None:CODE
LOWscrapy/statscollectors.py172 def set_value(self, key: str, value: Any, spider: Spider | None = None) -> None:CODE
LOWscrapy/statscollectors.py175 def set_stats(self, stats: StatsT, spider: Spider | None = None) -> None:CODE
LOWscrapy/exporters.py29logger = logging.getLogger(__name__)CODE
LOWscrapy/exporters.py31__all__ = [CODE
LOWscrapy/middleware.py26logger = logging.getLogger(__name__)CODE
LOWscrapy/middleware.py67 def _set_compat_spider(self, spider: Spider | None) -> None:CODE
LOWscrapy/crawler.py59logger = logging.getLogger(__name__)CODE
LOWscrapy/crawler.py172 def _update_logging(self) -> None:CODE
LOWscrapy/crawler.py873 def _setup_reactor(self, install_signal_handlers: bool) -> None:CODE
LOWscrapy/linkextractors/lxmlhtml.py35logger = logging.getLogger(__name__)CODE
LOWscrapy/linkextractors/__init__.py141__all__ = [CODE
LOWscrapy/downloadermiddlewares/cookies.py26logger = logging.getLogger(__name__)CODE
LOWscrapy/downloadermiddlewares/robotstxt.py30logger = logging.getLogger(__name__)CODE
LOWscrapy/downloadermiddlewares/redirect.py24logger = logging.getLogger(__name__)CODE
LOWscrapy/downloadermiddlewares/offsite.py17logger = logging.getLogger(__name__)CODE
LOWscrapy/downloadermiddlewares/offsite.py70 def _update_host_regex(self, spider: Spider) -> None:CODE
LOWscrapy/downloadermiddlewares/httpcache.py29logger = logging.getLogger(__name__)CODE
LOWscrapy/settings/default_settings.py21__all__ = [CODE
LOWscrapy/selector/unified.py14__all__ = ["Selector", "SelectorList"]CODE
LOWscrapy/selector/__init__.py8__all__ = [CODE
LOWscrapy/core/scraper.py54logger = logging.getLogger(__name__)CODE
LOWscrapy/core/spidermw.py39logger = logging.getLogger(__name__)CODE
LOWscrapy/core/engine.py64logger = logging.getLogger(__name__)CODE
LOWscrapy/core/scheduler.py26logger = logging.getLogger(__name__)CODE
LOWscrapy/core/downloader/tls.py34logger = logging.getLogger(__name__)CODE
LOWscrapy/core/downloader/handlers/_base_streaming.py50logger = logging.getLogger(__name__)CODE
LOWscrapy/core/downloader/handlers/__init__.py30logger = logging.getLogger(__name__)CODE
LOWscrapy/core/downloader/handlers/http11.py77logger = logging.getLogger(__name__)CODE
LOWscrapy/core/downloader/handlers/http.py17__all__ = [CODE
LOWscrapy/core/_http2/protocol.py52logger = logging.getLogger(__name__)CODE
LOWscrapy/core/_http2/stream.py35logger = logging.getLogger(__name__)CODE
LOWscrapy/spiders/sitemap.py25logger = logging.getLogger(__name__)CODE
LOWscrapy/spiders/__init__.py81 def _set_crawler(self, crawler: Crawler) -> None:CODE
LOWscrapy/spiders/__init__.py164 def update_settings(cls, settings: BaseSettings) -> None:CODE
LOWscrapy/spiders/__init__.py190__all__ = [CODE
LOWscrapy/pipelines/files.py67logger = logging.getLogger(__name__)CODE
LOWscrapy/pipelines/files.py513 def _update_stores(cls, settings: BaseSettings) -> None:CODE
LOWscrapy/pipelines/media.py51logger = logging.getLogger(__name__)CODE
LOWscrapy/pipelines/images.py133 def _update_stores(cls, settings: BaseSettings) -> None:CODE
LOWscrapy/utils/gz.py13__all__ = [CODE
52 more matches not shown…
Excessive Try-Catch Wrapping61 hits · 66 pts
SeverityFileLineSnippetContext
LOWtests/test_downloader_handler_httpx.py59except Exception:CODE
LOWtests/test_downloadermiddleware_httpcache.py396 except Exception:CODE
LOWtests/test_pipeline_media.py143 except Exception as exc:CODE
LOW…awlerProcess/twisted_reactor_custom_settings_select.py23 except Exception:CODE
LOW…sts/AsyncCrawlerProcess/reactorless_custom_settings.py29 except Exception:CODE
LOWscrapy/crawler.py310 except Exception:CODE
LOWscrapy/crawler.py344 except Exception:CODE
LOWscrapy/crawler.py614 except Exception:CODE
LOWscrapy/crawler.py730 except Exception:CODE
LOWscrapy/downloadermiddlewares/robotstxt.py105 except Exception as e:CODE
LOWscrapy/downloadermiddlewares/httpcache.py85 except Exception:CODE
LOWscrapy/core/scraper.py244 except Exception:CODE
LOWscrapy/core/scraper.py275 except Exception:CODE
LOWscrapy/core/scraper.py295 except Exception as spider_exc:CODE
LOWscrapy/core/scraper.py318 except Exception:CODE
LOWscrapy/core/scraper.py553 except Exception as ex:CODE
LOWscrapy/core/spidermw.py97 except Exception:CODE
LOWscrapy/core/spidermw.py111 except Exception as ex:CODE
LOWscrapy/core/spidermw.py240 except Exception as ex:CODE
LOWscrapy/core/engine.py239 except Exception:CODE
LOWscrapy/core/engine.py422 except Exception as exception:CODE
LOWscrapy/core/engine.py467 except Exception:CODE
LOWscrapy/core/engine.py567 except Exception:CODE
LOW⚡scrapy/core/engine.py935 except Exception:CODE
LOW⚡scrapy/core/engine.py940 except Exception:CODE
LOW⚡scrapy/core/engine.py945 except Exception:CODE
LOW⚡scrapy/core/engine.py952 except Exception:CODE
LOW⚡scrapy/core/engine.py962 except Exception:CODE
LOWscrapy/core/engine.py979 except Exception:CODE
LOWscrapy/core/engine.py994 except Exception:CODE
LOWscrapy/core/downloader/__init__.py344 except Exception:CODE
LOWscrapy/core/downloader/middleware.py95 except Exception as ex:CODE
LOWscrapy/core/downloader/middleware.py147 except Exception as ex:CODE
LOWscrapy/core/downloader/handlers/_base_streaming.py226 except Exception as e:CODE
LOWscrapy/core/downloader/handlers/__init__.py137 except Exception as ex:CODE
LOWscrapy/contracts/__init__.py62 except Exception:CODE
LOWscrapy/contracts/__init__.py241 except Exception:CODE
LOWscrapy/contracts/__init__.py321 except Exception:CODE
LOWscrapy/contracts/__init__.py331 except Exception:CODE
LOWscrapy/pipelines/files.py419 except Exception:CODE
LOWscrapy/pipelines/files.py676 except Exception as exc:CODE
LOWscrapy/pipelines/media.py210 except Exception:CODE
LOWscrapy/pipelines/media.py233 except Exception:CODE
LOWscrapy/utils/_ssl.py37 except Exception as ex:CODE
LOWscrapy/utils/signal.py64 except Exception:CODE
LOWscrapy/utils/signal.py200 except Exception as ex:CODE
LOWscrapy/utils/asyncio.py215 except Exception:CODE
LOWscrapy/utils/engine.py36 except Exception as e:CODE
LOWscrapy/utils/defer.py176 except Exception:CODE
LOWscrapy/utils/defer.py429 except Exception:CODE
LOWscrapy/utils/defer.py447 except Exception:CODE
LOWscrapy/extensions/feedexport.py830 except Exception:CODE
LOWscrapy/extensions/feedexport.py905 except Exception as e:CODE
LOWscrapy/extensions/remote_control.py186 except Exception:CODE
LOWscrapy/extensions/remote_control.py208 except Exception:CODE
LOWscrapy/extensions/remote_control.py231 except Exception:CODE
LOWscrapy/extensions/remote_control.py286 except Exception:CODE
MEDIUMscrapy/extensions/remote_control.py152def _start(self) -> None:CODE
LOWscrapy/extensions/httpcache.py434 except Exception:CODE
MEDIUMscrapy/commands/startproject.py56 print(f"Error: Module {project_name!r} already exists")CODE
1 more matches not shown…
Hallucination Indicators5 hits · 50 pts
SeverityFileLineSnippetContext
CRITICALtests/test_engine_loop.py363 spider.crawler.engine._slot.scheduler.enqueue_request(request)CODE
CRITICALtests/test_engine_loop.py405 spider.crawler.engine._slot.scheduler.enqueue_request(request)CODE
CRITICALtests/test_engine_loop.py455 spider.crawler.engine._slot.scheduler.enqueue_request(request)CODE
CRITICALtests/test_engine_loop.py468 spider.crawler.engine._slot.scheduler.enqueue_request(request)CODE
CRITICALscrapy/extensions/throttle.py97 return key, self.crawler.engine.downloader.slots.get(key)CODE
Decorative Section Separators10 hits · 30 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_spidermiddleware_output_chain.py36# ================================================================================COMMENT
MEDIUMtests/test_spidermiddleware_output_chain.py77# ================================================================================COMMENT
MEDIUMtests/test_spidermiddleware_output_chain.py118# ================================================================================COMMENT
MEDIUMtests/test_spidermiddleware_output_chain.py145# ================================================================================COMMENT
MEDIUMtests/test_spidermiddleware_output_chain.py156# ================================================================================COMMENT
MEDIUMtests/test_spidermiddleware_output_chain.py174# ================================================================================COMMENT
MEDIUMtests/test_spidermiddleware_output_chain.py185# ================================================================================COMMENT
MEDIUMtests/test_spidermiddleware_output_chain.py257# ================================================================================COMMENT
MEDIUMtests/test_spidermiddleware_output_chain.py291# ================================================================================COMMENT
MEDIUMtests/test_spidermiddleware_output_chain.py338# ================================================================================COMMENT
Over-Commented Block30 hits · 30 pts
SeverityFileLineSnippetContext
LOWconftest.py121COMMENT
LOWpyproject.toml301 "walltime: marks benchmarks that need CodSpeed's walltime mode to be meaningful",COMMENT
LOWpyproject.toml321 # These are triggered by garbage collecting an unclosed AiohttpDownloadHandler.COMMENT
LOWtests/test_item.py341 # This call to super() trigger the __classcell__ propagationCOMMENT
LOWtests/utils/bases/http_request.py141 url="http://www.scrapy.org/price/µ?currency=£", encoding="latin1"COMMENT
LOWtests/utils/bases/download_handlers_http.py81 # of building its own (https://github.com/scrapy/scrapy/issues/4919)COMMENT
LOWtests/benchmarks/urls.txt1# Link targets for the URL benchmarks, as they would appear in the hrefCOMMENT
LOWdocs/requirements.txt1# This file was autogenerated by uv via the following command:COMMENT
LOWdocs/requirements.txt21constantly==23.10.4COMMENT
LOWdocs/requirements.txt41 # via tldextractCOMMENT
LOWdocs/requirements.txt61 # itemloadersCOMMENT
LOWdocs/requirements.txt81 # scrapyCOMMENT
LOWdocs/requirements.txt101 # -r requirements.inCOMMENT
LOWdocs/requirements.txt121roman-numerals==4.1.0COMMENT
LOWdocs/requirements.txt141 # sphinx-scrapyCOMMENT
LOWdocs/requirements.txt181 # via sphinx-scrapyCOMMENT
LOWdocs/requirements.txt201 # parselCOMMENT
LOWdocs/conf.py121 r"\w+Contract\.(adjust_request_args|(pre|post)_process)$",COMMENT
LOWscrapy/shell.py41# official ways to use it:COMMENT
LOWscrapy/shell.py61# 2. scrapy.commands.shell.Command.run() calls crawler_process.start() in aCOMMENT
LOWscrapy/crawler.py1141 ) -> None:COMMENT
LOWscrapy/crawler.py1161 # 5. (after _run_loop() returns) _start_asyncio() calls _close_loop()COMMENT
LOWscrapy/crawler.py1181 # 2. _signal_shutdown_reactorless() calls _shutdown_graceful_reactorless()COMMENT
LOWscrapy/core/_http2/protocol.py121COMMENT
LOWscrapy/extensions/throttle.py101COMMENT
LOWscrapy/http/request/__init__.py201 #:COMMENT
LOWscrapy/http/request/__init__.py221 #: :ref:`callback-output`.COMMENT
LOWscrapy/http/request/__init__.py241 #:COMMENT
LOWscrapy/http/request/__init__.py261 #: default), or those components should not filter out this requestCOMMENT
LOWscrapy/templates/project/module/spiders/__init__.py1# This package will contain the spiders of your Scrapy projectCOMMENT
Deep Nesting27 hits · 26 pts
SeverityFileLineSnippetContext
LOWtests/test_downloadermiddleware_cookies.py208CODE
LOWtests/test_downloadermiddleware_cookies.py261CODE
LOWtests/test_downloadermiddleware_httpcache.py582CODE
LOWtests/utils/bases/engine.py105CODE
LOWdocs/utils/linkfix.py20CODE
LOWscrapy/pqueues.py236CODE
LOWscrapy/pqueues.py417CODE
LOWscrapy/downloadermiddlewares/httpproxy.py78CODE
LOWscrapy/selector/unified.py78CODE
LOWscrapy/core/downloader/middleware.py128CODE
LOWscrapy/core/_http2/protocol.py379CODE
LOWscrapy/core/_http2/stream.py410CODE
LOWscrapy/spiders/crawl.py292CODE
LOWscrapy/spiders/feed.py142CODE
LOWscrapy/pipelines/media.py144CODE
LOWscrapy/pipelines/media.py318CODE
LOWscrapy/pipelines/images.py211CODE
LOWscrapy/utils/_sitemap.py100CODE
LOWscrapy/utils/_sitemap.py55CODE
LOWscrapy/utils/request.py36CODE
LOWscrapy/utils/iterators.py21CODE
LOWscrapy/extensions/feedexport.py355CODE
LOWscrapy/extensions/feedexport.py885CODE
LOWscrapy/http/request/form.py171CODE
LOWscrapy/commands/check.py141CODE
LOWscrapy/commands/settings.py84CODE
LOWscrapy/commands/parse.py307CODE
Self-Referential Comments8 hits · 16 pts
SeverityFileLineSnippetContext
MEDIUMscrapy/core/scraper.py1"""This module implements the Scraper component which parses responses andSTRING
MEDIUMscrapy/core/spidermw.py289 # This method is only needed until _async compatibility methods are removed.COMMENT
MEDIUMscrapy/core/downloader/tls.py140 """This method is needed to override the verify callback."""STRING
MEDIUMscrapy/core/_http2/agent.py49 # Create a deferred which will fire with the H2ClientProtocolCOMMENT
MEDIUMscrapy/spiders/feed.py134 """This method is called for the nodes matching the provided tag nameSTRING
MEDIUMscrapy/utils/trackref.py1"""This module provides some functions and classes to record and reportSTRING
MEDIUMscrapy/commands/shell.py121 # Create the engine in the main threadCOMMENT
MEDIUMscrapy/commands/shell.py126 # Create the engine in the event loop threadCOMMENT
Fake / Example Data11 hits · 16 pts
SeverityFileLineSnippetContext
LOW⚡tests/test_downloadermiddleware_httpproxy.py285 request.meta["proxy"] = "https://user1:password1@example.org"CODE
LOW⚡tests/test_downloadermiddleware_httpproxy.py302 request.meta["proxy"] = "https://user1:password1@example.org"CODE
LOW⚡tests/test_downloadermiddleware_httpproxy.py325 request.meta["proxy"] = "https://user2:password2@example.org"CODE
LOW⚡tests/test_item.py68 i["name"] = "John Doe"CODE
LOW⚡tests/test_item.py72 assert itemrepr == "{'name': 'John Doe', 'number': 123}"CODE
LOW⚡tests/test_item.py75 assert i2["name"] == "John Doe"CODE
LOW⚡tests/test_settings/__init__.py692 dummy_config_value = settings.pop("DUMMY_CONFIG", "dummy_value")CODE
LOW⚡tests/test_settings/__init__.py693 assert dummy_config_value == "dummy_value"CODE
LOW⚡tests/test_settings/__init__.py697 {"DUMMY_CONFIG": "dummy_value", "OTHER_DUMMY_CONFIG": "other_dummy_value"}CODE
LOW⚡tests/test_settings/__init__.py700 assert settings.pop("DUMMY_CONFIG") == "dummy_value"CODE
LOWscrapy/http/request/form.py68 formdata={"name": "John Doe", "age": "27"},STRING
Cross-File Repetition3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHtests/test_command_runspider.py0import scrapy class myspider(scrapy.spider): name = 'myspider' async def start(self): self.logger.debug('it works!') retSTRING
HIGHtests/test_command_crawl.py0import scrapy class myspider(scrapy.spider): name = 'myspider' async def start(self): self.logger.debug('it works!') retSTRING
HIGHtests/test_commands.py0import scrapy class myspider(scrapy.spider): name = 'myspider' async def start(self): self.logger.debug('it works!') retSTRING
AI Structural Patterns11 hits · 11 pts
SeverityFileLineSnippetContext
LOWscrapy/mail.py61CODE
LOWscrapy/linkextractors/lxmlhtml.py326CODE
LOWscrapy/spiders/crawl.py122CODE
LOWscrapy/extensions/feedexport.py282CODE
LOWscrapy/http/response/__init__.py68CODE
LOWscrapy/http/response/__init__.py255CODE
LOWscrapy/http/response/__init__.py309CODE
LOWscrapy/http/response/text.py190CODE
LOWscrapy/http/response/text.py246CODE
LOWscrapy/http/request/__init__.py168CODE
LOWscrapy/http/request/form.py114CODE
Redundant / Tautological Comments5 hits · 8 pts
SeverityFileLineSnippetContext
LOWtests/test_http2_client_protocol.py401 # Check if headers were sent successfullyCOMMENT
LOWscrapy/core/_http2/stream.py382 # Check if we exceed the allowed max data size which can be receivedCOMMENT
LOWscrapy/core/_http2/agent.py55 # Check if we already have a connection to the remoteCOMMENT
LOWscrapy/pipelines/media.py192 # Check if request is downloading right now to avoid doing it twiceCOMMENT
LOWscrapy/utils/asyncio.py95 # Check if there is an installed asyncio reactor (it doesn't need to beCOMMENT
AI Slop Vocabulary3 hits · 4 pts
SeverityFileLineSnippetContext
LOWtests/mockserver/http_resources.py470 # just set this to trigger a test failure if no valid accept-encoding header was setCOMMENT
MEDIUMscrapy/utils/signal.py42 """Like ``pydispatch.robust.sendRobust()`` but it also logs errors and returnsSTRING
LOWscrapy/http/request/form.py294 # If we don't have clickdata, we just use the first clickable elementCOMMENT
Overly Generic Function Names3 hits · 2 pts
SeverityFileLineSnippetContext
LOW…ils_misc/test_return_with_argument_inside_generator.py82 def helper() -> int:STRING
LOW…ils_misc/test_return_with_argument_inside_generator.py136 def helper() -> int:STRING
LOW…ils_misc/test_return_with_argument_inside_generator.py202 def helper() -> int:STRING