Repository Analysis

apify/crawlee-python

Crawlee—A web scraping and browser automation library for Python to build reliable crawlers. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Parsel, BeautifulSoup, Playwright, and raw HTTP. Both headful and headless mode. With proxy rotation.

32.9 Strong AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of apify/crawlee-python, a Python project with 9,313 GitHub stars. SynthScan v2.0 examined 105,133 lines of code across 976 source files, recording 2087 pattern matches distributed across 19 syntactic categories. The overall adjusted score of 32.9 places this repository in the Strong AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

32.9
Adjusted Score
32.9
Raw Score
100%
Time Factor
2026-07-14
Last Push
9.3K
Stars
Python
Language
105.1K
Lines of Code
976
Files
2.1K
Pattern Hits
2026-07-14
Scan Date
0.15
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 143MEDIUM 373LOW 1571

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 2087 distinct pattern matches across 19 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Self-Referential Comments358 hits · 1081 pts
SeverityFileLineSnippetContext
MEDIUM…d_docs/version-1.8/introduction/code_examples/02_bs.py17 # Define a request handler and attach it to the crawler using the decorator.COMMENT
MEDIUM…ides/code_examples/request_router/router_middleware.py10 # Create a custom router instanceCOMMENT
MEDIUM…_examples/request_router/custom_router_default_only.py8 # Create a custom router instanceCOMMENT
MEDIUM…code_examples/request_router/failed_request_handler.py7 # Create a crawler instance with retry settingsCOMMENT
MEDIUM…8/guides/code_examples/request_router/error_handler.py11 # Create a crawler instanceCOMMENT
MEDIUM…code_examples/request_router/simple_default_handler.py7 # Create a crawler instanceCOMMENT
MEDIUM…code_examples/request_router/basic_request_handlers.py9 # Create a custom router instanceCOMMENT
MEDIUM…code_examples/request_router/basic_request_handlers.py12 # Define the default handler (fallback for requests without specific labels)COMMENT
MEDIUM…code_examples/request_router/basic_request_handlers.py31 # Define a handler for category pagesCOMMENT
MEDIUM…code_examples/request_router/basic_request_handlers.py53 # Define a handler for product detail pagesCOMMENT
MEDIUM…ples/storages/dataset_with_crawler_explicit_example.py12 # Create a new crawler (it can be any subclass of BasicCrawler).COMMENT
MEDIUM…ples/storages/dataset_with_crawler_explicit_example.py15 # Define the default request handler, which will be called for every request.COMMENT
MEDIUM…des/code_examples/storages/kvs_with_crawler_example.py7 # Create a new Playwright crawler.COMMENT
MEDIUM…des/code_examples/storages/kvs_with_crawler_example.py10 # Define the default request handler, which will be called for every request.COMMENT
MEDIUM…code_examples/storages/dataset_with_crawler_example.py7 # Create a new crawler (it can be any subclass of BasicCrawler).COMMENT
MEDIUM…code_examples/storages/dataset_with_crawler_example.py10 # Define the default request handler, which will be called for every request.COMMENT
MEDIUM…examples/storages/kvs_with_crawler_explicit_example.py12 # Create a new Playwright crawler.COMMENT
MEDIUM…examples/storages/kvs_with_crawler_explicit_example.py15 # Define the default request handler, which will be called for every request.COMMENT
MEDIUM…ides/code_examples/storages/rq_with_crawler_example.py7 # Create a new crawler (it can be any subclass of BasicCrawler). Request queue isCOMMENT
MEDIUM…ides/code_examples/storages/rq_with_crawler_example.py11 # Define the default request handler, which will be called for every request.COMMENT
MEDIUM…_examples/storages/rq_with_crawler_explicit_example.py15 # Create a new crawler (it can be any subclass of BasicCrawler) and pass the requestCOMMENT
MEDIUM…_examples/storages/rq_with_crawler_explicit_example.py19 # Define the default request handler, which will be called for every request.COMMENT
MEDIUM…s/code_examples/http_crawlers/beautifulsoup_example.py7 # Create a BeautifulSoupCrawler instanceCOMMENT
MEDIUM…s/code_examples/http_crawlers/beautifulsoup_example.py13 # Define the default request handlerCOMMENT
MEDIUM…1.8/guides/code_examples/http_crawlers/http_example.py8 # Create an HttpCrawler instance - no automatic parsingCOMMENT
MEDIUM…1.8/guides/code_examples/http_crawlers/http_example.py14 # Define the default request handlerCOMMENT
MEDIUM…8/guides/code_examples/http_crawlers/parsel_example.py7 # Create a ParselCrawler instanceCOMMENT
MEDIUM…8/guides/code_examples/http_crawlers/parsel_example.py13 # Define the default request handlerCOMMENT
MEDIUM…reating_web_archive/manual_archiving_parsel_crawler.py37 # Create a WARC archive file a prepare the writer.COMMENT
MEDIUM…reating_web_archive/manual_archiving_parsel_crawler.py42 # Create a WARC info record to store metadata about the archive.COMMENT
MEDIUM…reating_web_archive/manual_archiving_parsel_crawler.py50 # Define the default request handler, which will be called for every request.COMMENT
MEDIUM…ing_web_archive/manual_archiving_playwright_crawler.py52 # Create a WARC archive file a prepare the writer.COMMENT
MEDIUM…ing_web_archive/manual_archiving_playwright_crawler.py57 # Create a WARC info record to store metadata about the archive.COMMENT
MEDIUM…n-1.8/guides/code_examples/login_crawler/http_login.py68 # Create a POST request to the authentication API endpointCOMMENT
MEDIUM…des/code_examples/http_clients/parsel_impit_example.py21 # Define the default request handler, which will be called for every request.COMMENT
MEDIUM…des/code_examples/http_clients/parsel_httpx_example.py20 # Define the default request handler, which will be called for every request.COMMENT
MEDIUM…amples/http_clients/parsel_curl_impersonate_example.py20 # Define the default request handler, which will be called for every request.COMMENT
MEDIUM…des/code_examples/error_handling/handle_proxy_error.py27 # Create a new `Request` with a modified key to avoid deduplicationCOMMENT
MEDIUM…8/guides/code_examples/error_handling/disable_retry.py10 # Create a parsing error for demonstrationCOMMENT
MEDIUM…void_blocking/playwright_with_fingerprint_generator.py10 # Define the default request handler, which will be called for every request.COMMENT
MEDIUM…xamples/avoid_blocking/playwright_with_cloakbrowser.py56 # Define the default request handler, which will be called for every request.COMMENT
MEDIUM…examples/playwright_crawler/multiple_launch_example.py8 # Create a plugin for each required browser.COMMENT
MEDIUM…/storage_clients/redis_storage_client_basic_example.py4# Create a new instance of storage client using connection string.COMMENT
MEDIUM…ge_clients/file_system_storage_client_basic_example.py4# Create a new instance of storage client.COMMENT
MEDIUM…ts/file_system_storage_client_configuration_example.py5# Create a new instance of storage client.COMMENT
MEDIUM…ts/file_system_storage_client_configuration_example.py8# Create a configuration with custom settings.COMMENT
MEDIUM…_clients/redis_storage_client_configuration_example.py7# Create a new instance of storage client using a Redis client with custom settings.COMMENT
MEDIUM…_clients/redis_storage_client_configuration_example.py20# Create a configuration with custom settings.COMMENT
MEDIUM…es/storage_clients/sql_storage_client_basic_example.py6 # Create a new instance of storage client.COMMENT
MEDIUM…ge_clients/sql_storage_client_configuration_example.py9 # Create a new instance of storage client.COMMENT
MEDIUM…ge_clients/sql_storage_client_configuration_example.py24 # Create a configuration with custom settings.COMMENT
MEDIUM…storage_clients/memory_storage_client_basic_example.py4# Create a new instance of storage client.COMMENT
MEDIUM…des/code_examples/proxy_management/tiers_bs_example.py8 # Create a ProxyConfiguration object and pass it to the crawler.COMMENT
MEDIUM…des/code_examples/proxy_management/tiers_bs_example.py28 # Define the default request handler, which will be called for every request.COMMENT
MEDIUM…des/code_examples/proxy_management/tiers_pw_example.py8 # Create a ProxyConfiguration object and pass it to the crawler.COMMENT
MEDIUM…des/code_examples/proxy_management/tiers_pw_example.py28 # Define the default request handler, which will be called for every request.COMMENT
MEDIUM…s/code_examples/proxy_management/session_bs_example.py8 # Create a ProxyConfiguration object and pass it to the crawler.COMMENT
MEDIUM…s/code_examples/proxy_management/session_pw_example.py8 # Create a ProxyConfiguration object and pass it to the crawler.COMMENT
MEDIUM…de_examples/proxy_management/integration_pw_example.py8 # Create a ProxyConfiguration object and pass it to the crawler.COMMENT
MEDIUM…de_examples/proxy_management/integration_pw_example.py17 # Define the default request handler, which will be called for every request.COMMENT
298 more matches not shown…
Hyper-Verbose Identifiers887 hits · 900 pts
SeverityFileLineSnippetContext
LOW…ides/code_examples/http_crawlers/selectolax_context.py25 def from_parsed_http_crawling_context(CODE
LOW…ples/code_examples/beautifulsoup_crawler_keep_alive.py13 def stop_crawler_if_url_visited(context: BasicCrawlingContext) -> None:CODE
LOW…/examples/code_examples/adaptive_playwright_crawler.py22 async def request_handler_for_label(CODE
LOW…ples/code_examples/beautifulsoup_crawler_keep_alive.py13 def stop_crawler_if_url_visited(context: BasicCrawlingContext) -> None:CODE
LOW…/examples/code_examples/adaptive_playwright_crawler.py21 async def request_handler_for_label(CODE
LOWwebsite/src/theme/Navbar/MobileSidebar/Layout/index.js5export default function NavbarMobileSidebarLayout({ header, primaryMenu, secondaryMenu }) {CODE
LOWwebsite/src/theme/Navbar/MobileSidebar/Header/index.js29export default function NavbarMobileSidebarHeader() {CODE
LOW…/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.js93export default function DocsVersionDropdownNavbarItem({CODE
LOWtests/unit/conftest.py84def _isolate_test_environment(prepare_test_env: Callable[[], None]) -> None:CODE
LOWtests/unit/server.py297async def generic_response_endpoint(_scope: dict[str, Any], _receive: Receive, send: Send) -> None:CODE
LOWtests/unit/server.py305async def problematic_links_endpoint(_scope: dict[str, Any], _receive: Receive, send: Send) -> None:CODE
LOWtests/unit/server.py496async def resource_loading_endpoint(_scope: dict[str, Any], _receive: Receive, send: Send) -> None:CODE
LOWtests/unit/server.py514async def start_enqueue_non_href_endpoint(_scope: dict[str, Any], _receive: Receive, send: Send) -> None:CODE
LOWtests/unit/test_configuration.py23def test_configuration_rejects_out_of_range_max_used_cpu_ratio(invalid_value: float) -> None:CODE
LOWtests/unit/test_configuration.py29def test_configuration_rejects_out_of_range_max_used_memory_ratio(invalid_value: float) -> None:CODE
LOWtests/unit/test_configuration.py35def test_configuration_accepts_in_range_max_used_cpu_ratio(valid_value: float) -> None:CODE
LOWtests/unit/test_configuration.py40def test_configuration_accepts_in_range_max_used_memory_ratio(valid_value: float) -> None:CODE
LOWtests/unit/test_configuration.py44def test_global_configuration_works() -> None:CODE
LOWtests/unit/test_configuration.py53def test_global_configuration_works_reversed() -> None:CODE
LOWtests/unit/test_configuration.py62async def test_storage_not_persisted_when_non_persistable_storage_used(tmp_path: Path, server_url: URL) -> None:CODE
LOWtests/unit/test_configuration.py78async def test_storage_persisted_with_explicit_statistics_with_persistable_storage(CODE
LOWtests/unit/test_configuration.py103async def test_storage_persisted_when_enabled(tmp_path: Path, server_url: URL) -> None:CODE
LOWtests/unit/test_router.py37async def test_router_no_default_handler() -> None:CODE
LOWtests/unit/test_router.py51async def test_router_default_handler_invoked() -> None:CODE
LOWtests/unit/test_router.py70async def test_router_specific_handler_invoked() -> None:CODE
LOWtests/unit/test_router.py95async def test_router_handler_not_nullified() -> None:CODE
LOWtests/unit/test_router.py105async def test_router_multi_labelled_handler() -> None:CODE
LOWtests/unit/test_router.py121async def test_router_use_middleware() -> None:CODE
LOWtests/unit/test_router.py149async def test_router_use_middleware_with_label() -> None:CODE
LOWtests/unit/test_router.py184async def test_router_middleware_order_execution() -> None:CODE
LOWtests/unit/test_router.py208async def test_router_middleware_exception_interrupts_chain() -> None:CODE
LOWtests/unit/test_service_locator.py12def test_default_configuration() -> None:CODE
LOWtests/unit/test_service_locator.py18def test_custom_configuration() -> None:CODE
LOWtests/unit/test_service_locator.py25def test_configuration_overwrite_not_possible() -> None:CODE
LOWtests/unit/test_service_locator.py34def test_configuration_conflict() -> None:CODE
LOWtests/unit/test_service_locator.py42def test_default_event_manager() -> None:CODE
LOWtests/unit/test_service_locator.py47def test_custom_event_manager() -> None:CODE
LOWtests/unit/test_service_locator.py54def test_event_manager_overwrite_not_possible() -> None:CODE
LOWtests/unit/test_service_locator.py63def test_event_manager_conflict() -> None:CODE
LOWtests/unit/test_service_locator.py71def test_default_storage_client() -> None:CODE
LOWtests/unit/test_service_locator.py76def test_custom_storage_client() -> None:CODE
LOWtests/unit/test_service_locator.py83def test_storage_client_overwrite_not_possible() -> None:CODE
LOWtests/unit/test_service_locator.py92def test_storage_client_conflict() -> None:CODE
LOWtests/unit/test_log_config.py40def test_formatting_with_exception() -> None:CODE
LOWtests/unit/test_log_config.py54def test_formatter_without_name() -> None:CODE
LOWtests/unit/test_cli.py57def test_create_interactive_non_default_template(mock_cookiecutter: Mock, monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/unit/test_cli.py91def test_create_non_interactive(mock_cookiecutter: Mock) -> None:CODE
LOWtests/unit/test_cli.py125def test_create_existing_folder(CODE
LOWtests/unit/test_cli.py174def test_create_existing_folder_interactive(CODE
LOWtests/unit/test_cli.py214def test_create_existing_folder_interactive_multiple_attempts(CODE
LOWtests/unit/test_cli.py266def test_import_error_handled(optional_module_name: str) -> None:CODE
LOWtests/unit/test_throttling_request_manager.py150async def test_record_domain_delay_returns_false_for_unconfigured_domain(CODE
LOWtests/unit/test_throttling_request_manager.py158async def test_different_domains_independent(manager: ThrottlingRequestManager[RequestQueue]) -> None:CODE
LOWtests/unit/test_throttling_request_manager.py243async def test_crawl_delay_integration(manager: ThrottlingRequestManager[RequestQueue]) -> None:CODE
LOWtests/unit/test_throttling_request_manager.py252async def test_crawl_delay_throttles_after_dispatch(manager: ThrottlingRequestManager[RequestQueue]) -> None:CODE
LOWtests/unit/test_throttling_request_manager.py265async def test_fetch_from_unthrottled_sub_manager(CODE
LOWtests/unit/test_throttling_request_manager.py533def test_parse_retry_after_none_value() -> None:CODE
LOWtests/unit/test_throttling_request_manager.py537def test_parse_retry_after_empty_string() -> None:CODE
LOWtests/unit/test_throttling_request_manager.py541def test_parse_retry_after_integer_seconds() -> None:CODE
LOWtests/unit/test_throttling_request_manager.py546def test_parse_retry_after_zero_seconds() -> None:CODE
827 more matches not shown…
Cross-File Repetition111 hits · 555 pts
SeverityFileLineSnippetContext
HIGH…reating_web_archive/manual_archiving_parsel_crawler.py0helper function for archiving response in warc format.STRING
HIGH…ing_web_archive/manual_archiving_playwright_crawler.py0helper function for archiving response in warc format.STRING
HIGH…reating_web_archive/manual_archiving_parsel_crawler.py0helper function for archiving response in warc format.STRING
HIGH…ing_web_archive/manual_archiving_playwright_crawler.py0helper function for archiving response in warc format.STRING
HIGH…_examples/playwright_crawler_adaptive/pre_nav_hooks.py0hook executed both in static sub crawler and playwright sub crawler. trying to access `context.page` in this hook would STRING
HIGH…/examples/code_examples/adaptive_playwright_crawler.py0hook executed both in static sub crawler and playwright sub crawler. trying to access `context.page` in this hook would STRING
HIGH…_examples/playwright_crawler_adaptive/pre_nav_hooks.py0hook executed both in static sub crawler and playwright sub crawler. trying to access `context.page` in this hook would STRING
HIGH…/examples/code_examples/adaptive_playwright_crawler.py0hook executed both in static sub crawler and playwright sub crawler. trying to access `context.page` in this hook would STRING
HIGH…_examples/playwright_crawler_adaptive/pre_nav_hooks.py0hook executed both in static sub crawler and playwright sub crawler. trying to access `context.page` in this hook would STRING
HIGH…/examples/code_examples/adaptive_playwright_crawler.py0hook executed both in static sub crawler and playwright sub crawler. trying to access `context.page` in this hook would STRING
HIGH…8/guides/code_examples/running_in_web_server/server.py0<!doctype html> <html> <body> <h1>scraper server</h1> <p>to scrape some page, visit "scrape" endpoint with url parameterSTRING
HIGH…6/guides/code_examples/running_in_web_server/server.py0<!doctype html> <html> <body> <h1>scraper server</h1> <p>to scrape some page, visit "scrape" endpoint with url parameterSTRING
HIGH…s/guides/code_examples/running_in_web_server/server.py0<!doctype html> <html> <body> <h1>scraper server</h1> <p>to scrape some page, visit "scrape" endpoint with url parameterSTRING
HIGH…ples/pydantic_ai_crawler/selector_extractor_example.py0model representing the extracted data for an article.STRING
HIGH…amples/pydantic_ai_crawler/custom_distiller_example.py0model representing the extracted data for an article.STRING
HIGH…code_examples/pydantic_ai_crawler/debugging_example.py0model representing the extracted data for an article.STRING
HIGH…des/code_examples/pydantic_ai_crawler/basic_example.py0model representing the extracted data for an article.STRING
HIGH…de_examples/pydantic_ai_crawler/usage_limit_example.py0model representing the extracted data for an article.STRING
HIGH…ples/pydantic_ai_crawler/selector_extractor_example.py0model representing the extracted data for an article.STRING
HIGH…amples/pydantic_ai_crawler/custom_distiller_example.py0model representing the extracted data for an article.STRING
HIGH…code_examples/pydantic_ai_crawler/debugging_example.py0model representing the extracted data for an article.STRING
HIGH…des/code_examples/pydantic_ai_crawler/basic_example.py0model representing the extracted data for an article.STRING
HIGH…de_examples/pydantic_ai_crawler/usage_limit_example.py0model representing the extracted data for an article.STRING
HIGH…8/deployment/code_examples/google/cloud_run_example.py0the crawler entry point that will be called when the http endpoint is accessed.STRING
HIGH…6/deployment/code_examples/google/cloud_run_example.py0the crawler entry point that will be called when the http endpoint is accessed.STRING
HIGH…s/deployment/code_examples/google/cloud_run_example.py0the crawler entry point that will be called when the http endpoint is accessed.STRING
HIGH…8/deployment/code_examples/google/cloud_run_example.py0default request handler that processes each page during crawling.STRING
HIGH…6/deployment/code_examples/google/cloud_run_example.py0default request handler that processes each page during crawling.STRING
HIGH…s/deployment/code_examples/google/cloud_run_example.py0default request handler that processes each page during crawling.STRING
HIGH…ples/code_examples/playwright_crawler_with_camoufox.py0example browser plugin that uses camoufox browser, but otherwise keeps the functionality of playwrightbrowserplugin.STRING
HIGH…ples/code_examples/playwright_crawler_with_camoufox.py0example browser plugin that uses camoufox browser, but otherwise keeps the functionality of playwrightbrowserplugin.STRING
HIGH…ples/code_examples/playwright_crawler_with_camoufox.py0example browser plugin that uses camoufox browser, but otherwise keeps the functionality of playwrightbrowserplugin.STRING
HIGH…project_template/templates/main_playwright_camoufox.py0example browser plugin that uses camoufox browser, but otherwise keeps the functionality of playwrightbrowserplugin.STRING
HIGH…ples/code_examples/beautifulsoup_crawler_keep_alive.py0stop crawler once specific url is visited. example of guard condition to stop the crawler.STRING
HIGH…ples/code_examples/beautifulsoup_crawler_keep_alive.py0stop crawler once specific url is visited. example of guard condition to stop the crawler.STRING
HIGH…ples/code_examples/beautifulsoup_crawler_keep_alive.py0stop crawler once specific url is visited. example of guard condition to stop the crawler.STRING
HIGH…ples/code_examples/beautifulsoup_crawler_keep_alive.py0add requests to the queue after some time. can be done by external code.STRING
HIGH…ples/code_examples/beautifulsoup_crawler_keep_alive.py0add requests to the queue after some time. can be done by external code.STRING
HIGH…ples/code_examples/beautifulsoup_crawler_keep_alive.py0add requests to the queue after some time. can be done by external code.STRING
HIGH…/examples/code_examples/adaptive_playwright_crawler.py0hook executed only in playwright sub crawler. it is safe to access `page` object.STRING
HIGH…/examples/code_examples/adaptive_playwright_crawler.py0hook executed only in playwright sub crawler. it is safe to access `page` object.STRING
HIGH…/examples/code_examples/adaptive_playwright_crawler.py0hook executed only in playwright sub crawler. it is safe to access `page` object.STRING
HIGHtests/unit/storages/test_request_queue.py0test that open() raises an error when both id and name are provided.STRING
HIGHtests/unit/storages/test_dataset.py0test that open() raises an error when both id and name are provided.STRING
HIGHtests/unit/storages/test_key_value_store.py0test that open() raises an error when both id and name are provided.STRING
HIGHtests/unit/storages/test_request_queue.py0test that providing both alias and id raises error.STRING
HIGHtests/unit/storages/test_dataset.py0test that providing both alias and id raises error.STRING
HIGHtests/unit/storages/test_key_value_store.py0test that providing both alias and id raises error.STRING
HIGHtests/unit/storages/test_request_queue.py0test that providing both alias and name raises error.STRING
HIGHtests/unit/storages/test_dataset.py0test that providing both alias and name raises error.STRING
HIGHtests/unit/storages/test_key_value_store.py0test that providing both alias and name raises error.STRING
HIGHtests/unit/storages/test_request_queue.py0test that conflicts between named and alias storages are detected.STRING
HIGHtests/unit/storages/test_dataset.py0test that conflicts between named and alias storages are detected.STRING
HIGHtests/unit/storages/test_key_value_store.py0test that conflicts between named and alias storages are detected.STRING
HIGHtests/unit/storages/test_request_queue.py0test purge behavior when purge_on_start=true: named storages retain data, unnamed storages are purged.STRING
HIGHtests/unit/storages/test_dataset.py0test purge behavior when purge_on_start=true: named storages retain data, unnamed storages are purged.STRING
HIGHtests/unit/storages/test_key_value_store.py0test purge behavior when purge_on_start=true: named storages retain data, unnamed storages are purged.STRING
HIGHtests/unit/storages/test_request_queue.py0test purge behavior when purge_on_start=false: all storages retain data regardless of type.STRING
HIGHtests/unit/storages/test_dataset.py0test purge behavior when purge_on_start=false: all storages retain data regardless of type.STRING
HIGHtests/unit/storages/test_key_value_store.py0test purge behavior when purge_on_start=false: all storages retain data regardless of type.STRING
51 more matches not shown…
Unused Imports429 hits · 410 pts
SeverityFileLineSnippetContext
LOWwebsite/generate_module_shortcuts.py3CODE
LOW…1.8/introduction/code_examples/03_transform_request.py1CODE
LOW…uides/code_examples/http_crawlers/selectolax_parser.py1CODE
LOW…ides/code_examples/http_crawlers/selectolax_crawler.py1CODE
LOW…/playwright_crawler/browser_pool_page_hooks_example.py1CODE
LOW…laywright_crawler/browser_pool_launch_hooks_example.py1CODE
LOW…mples/storage_clients/custom_storage_client_example.py1CODE
LOW…8/guides/code_examples/running_in_web_server/server.py1CODE
LOW…n-1.8/examples/code_examples/configure_json_logging.py1CODE
LOW…0.6/introduction/code_examples/03_transform_request.py1CODE
LOW…6/guides/code_examples/running_in_web_server/server.py1CODE
LOW…n-0.6/examples/code_examples/configure_json_logging.py1CODE
LOWtests/unit/conftest.py1CODE
LOWtests/unit/server.py1CODE
LOWtests/unit/test_configuration.py1CODE
LOWtests/unit/test_router.py1CODE
LOWtests/unit/test_service_locator.py1CODE
LOWtests/unit/test_log_config.py1CODE
LOWtests/unit/utils.py1CODE
LOWtests/unit/test_cli.py1CODE
LOWtests/unit/test_throttling_request_manager.py3CODE
LOWtests/unit/fingerprint_suite/test_header_generator.py1CODE
LOWtests/unit/_utils/test_measure_time.py1CODE
LOWtests/unit/_utils/test_retry.py1CODE
LOWtests/unit/_utils/test_crypto.py1CODE
LOWtests/unit/_utils/test_console.py1CODE
LOWtests/unit/_utils/test_time.py1CODE
LOWtests/unit/_utils/test_recurring_task.py1CODE
LOWtests/unit/_utils/test_robots.py1CODE
LOWtests/unit/_utils/test_log.py1CODE
LOWtests/unit/_utils/test_sitemap.py25CODE
LOWtests/unit/_utils/test_system.py1CODE
LOWtests/unit/_utils/test_requests.py1CODE
LOWtests/unit/_utils/test_file.py1CODE
LOWtests/unit/_utils/test_globs.py1CODE
LOWtests/unit/_utils/test_byte_size.py1CODE
LOWtests/unit/_utils/test_timedelta_ms.py1CODE
LOWtests/unit/_utils/test_urls.py1CODE
LOWtests/unit/_utils/test_html_to_text.py1CODE
LOWtests/unit/_statistics/test_persistence.py1CODE
LOWtests/unit/_statistics/test_request_max_duration.py1CODE
LOWtests/unit/_statistics/test_periodic_logging.py1CODE
LOWtests/unit/storages/test_request_manager_tandem.py1CODE
LOWtests/unit/storages/conftest.py1CODE
LOWtests/unit/storages/test_request_queue.py1CODE
LOWtests/unit/storages/test_dataset.py1CODE
LOWtests/unit/storages/test_key_value_store.py1CODE
LOWtests/unit/crawlers/_basic/test_context_pipeline.py1CODE
LOWtests/unit/crawlers/_basic/test_basic_crawler.py2CODE
LOW…/crawlers/_beautifulsoup/test_beautifulsoup_crawler.py1CODE
LOWtests/unit/crawlers/_parsel/test_parsel_crawler.py1CODE
LOW…ts/unit/crawlers/_pydantic_ai/test_direct_extractor.py1CODE
LOW…nit/crawlers/_pydantic_ai/test_clean_html_distiller.py1CODE
LOW…/unit/crawlers/_pydantic_ai/test_skeleton_distiller.py1CODE
LOW…/unit/crawlers/_pydantic_ai/test_selector_extractor.py1CODE
LOW…unit/crawlers/_pydantic_ai/test_pydantic_ai_crawler.py1CODE
LOW…s/unit/crawlers/_playwright/test_playwright_crawler.py1CODE
LOW…sts/unit/crawlers/_stagehand/test_stagehand_crawler.py1CODE
LOWtests/unit/crawlers/_http/test_http_crawler.py1CODE
LOW…daptive_playwright/test_adaptive_playwright_crawler.py1CODE
369 more matches not shown…
Docstring Block Structure25 hits · 125 pts
SeverityFileLineSnippetContext
HIGHsrc/crawlee/_utils/file.py64Resolve a storage subdirectory inside a base directory. Joins `subdirectory` onto `base_dir` and verifies that the STRING
HIGHsrc/crawlee/_utils/context.py12Ensure the (async) context manager is initialized before executing the method. This decorator checks if the callingSTRING
HIGHsrc/crawlee/storages/_storage_instance_manager.py93Open a storage instance with caching support. Args: cls: The storage class to instantiate. STRING
HIGHsrc/crawlee/crawlers/_playwright/_playwright_crawler.py378Execute an HTTP request utilizing the `BrowserPool` and the `Playwright` library. Args: context: ThSTRING
HIGHsrc/crawlee/crawlers/_playwright/_playwright_crawler.py523Validate the HTTP status code and raise appropriate exceptions if needed. Args: context: The currenSTRING
HIGHsrc/crawlee/crawlers/_playwright/_playwright_crawler.py551Try to detect if the request is blocked based on the response content. Args: context: The current cSTRING
HIGH…wlee/crawlers/_abstract_http/_abstract_http_crawler.py292Validate the HTTP status code and raise appropriate exceptions if needed. Args: context: The currenSTRING
HIGH…wlee/crawlers/_abstract_http/_abstract_http_crawler.py319Try to detect if the request is blocked based on the parsed response content. Args: context: The cuSTRING
HIGHsrc/crawlee/http_clients/_base.py109Perform the crawling for a given request. This method is called from `crawler.run()`. Args: STRING
HIGHsrc/crawlee/http_clients/_base.py139Send an HTTP request via the client. This method is called from `context.send_request()` helper. Args:STRING
HIGHsrc/crawlee/http_clients/_base.py171Stream an HTTP request via the client. This method should be used for downloading potentially large data where STRING
HIGHsrc/crawlee/http_clients/_curl_impersonate.py310Convert from Crawlee HTTP method to curl-cffi HTTP method. Args: method: Crawlee HTTP method. STRING
HIGHsrc/crawlee/browsers/_browser_controller.py73Create a new page with the given context options. Args: browser_new_context_options: Keyword argumeSTRING
HIGHsrc/crawlee/browsers/_playwright_browser_controller.py158Create a new page with the given context options. Args: browser_new_context_options: Keyword argumeSTRING
HIGHsrc/crawlee/browsers/_stagehand_types.py119Extract structured data from the page using natural language. Argument `page` is automatically set. Args: STRING
HIGHsrc/crawlee/browsers/_stagehand_types.py131Run an autonomous multi-step AI agent on the page. Argument `page` is automatically set. Args: **kwSTRING
HIGH…/crawlee/storage_clients/_sql/_request_queue_client.py133Open an existing request queue or create a new one. This method first tries to find an existing queue by ID or STRING
HIGH…rawlee/storage_clients/_sql/_key_value_store_client.py95Open or create a SQL key-value store client. This method attempts to open an existing key-value store from the STRING
HIGHsrc/crawlee/storage_clients/_sql/_dataset_client.py93Open an existing dataset or create a new one. Args: id: The ID of the dataset to open. If provided,STRING
HIGH…/storage_clients/_file_system/_request_queue_client.py162Open or create a file system request queue client. This method attempts to open an existing request queue from STRING
HIGH…torage_clients/_file_system/_key_value_store_client.py98Open or create a file system key-value store client. This method attempts to open an existing key-value store fSTRING
HIGH…rawlee/storage_clients/_file_system/_dataset_client.py100Open or create a file system dataset client. This method attempts to open an existing dataset from the file sysSTRING
HIGH…awlee/storage_clients/_memory/_request_queue_client.py69Open or create a new memory request queue client. This method creates a new in-memory request queue instance. USTRING
HIGH…lee/storage_clients/_memory/_key_value_store_client.py57Open or create a new memory key-value store client. This method creates a new in-memory key-value store instancSTRING
HIGHsrc/crawlee/storage_clients/_memory/_dataset_client.py62Open or create a new memory dataset client. This method creates a new in-memory dataset instance. Unlike persisSTRING
Redundant / Tautological Comments50 hits · 80 pts
SeverityFileLineSnippetContext
LOW…guides/code_examples/login_crawler/playwright_login.py47 # Check if the session is availableCOMMENT
LOW…8/guides/code_examples/running_in_web_server/server.py57 # Return the resultSTRING
LOW…code_examples/pydantic_ai_crawler/debugging_example.py40 # Set concurrency to 1, which ensures only one request is processed at a time.COMMENT
LOW…code_examples/pydantic_ai_crawler/debugging_example.py44 # Set abort_on_error to True to stop the crawl if an error occurs duringCOMMENT
LOW…les/code_examples/respect_robots_on_skipped_request.py22 # Check if the request was skipped due to robots.txt rulesCOMMENT
LOW…guides/code_examples/login_crawler/playwright_login.py47 # Check if the session is availableCOMMENT
LOW…6/guides/code_examples/running_in_web_server/server.py57 # Return the resultSTRING
LOW…les/code_examples/respect_robots_on_skipped_request.py22 # Check if the request was skipped due to robots.txt rulesCOMMENT
LOWtests/unit/crawlers/_basic/test_basic_crawler.py963 # Set max_concurrency to 1 to ensure testing max_requests_per_crawl accuratelyCOMMENT
LOWtests/unit/crawlers/_basic/test_basic_crawler.py987 # Set max_concurrency to 1 to ensure testing max_requests_per_crawl accuratelyCOMMENT
LOWtests/unit/crawlers/_basic/test_basic_crawler.py1237 # Set max_concurrency to 1 to ensure testing urls are visited one by one in order.COMMENT
LOWtests/unit/crawlers/_basic/test_basic_crawler.py1265 # Set concurrency to 2 to ensure two urls are being visited in parallel.COMMENT
LOW…/crawlers/_beautifulsoup/test_beautifulsoup_crawler.py113 # Set max_concurrency to 1 to ensure testing max_requests_per_crawl accuratelyCOMMENT
LOWtests/unit/crawlers/_parsel/test_parsel_crawler.py132 # Set max_concurrency to 1 to ensure testing max_requests_per_crawl accuratelyCOMMENT
LOWtests/unit/sessions/test_session_pool.py136 # Check if the state is correctly persistedCOMMENT
LOWtests/unit/sessions/test_session_pool.py141 # Check if all the sessions are correctly persistedCOMMENT
LOW…s/unit/storage_clients/_redis/test_redis_kvs_client.py60 # Check if the records were createdCOMMENT
LOW…s/unit/storage_clients/_redis/test_redis_kvs_client.py121 # Check if record content is valid JSONCOMMENT
LOW…nit/storage_clients/_file_system/test_fs_kvs_client.py85 # Check if the files were createdCOMMENT
LOW…nit/storage_clients/_file_system/test_fs_kvs_client.py130 # Check if file content is valid JSONCOMMENT
LOW…guides/code_examples/login_crawler/playwright_login.py47 # Check if the session is availableCOMMENT
LOW…s/guides/code_examples/running_in_web_server/server.py57 # Return the resultSTRING
LOW…code_examples/pydantic_ai_crawler/debugging_example.py40 # Set concurrency to 1, which ensures only one request is processed at a time.COMMENT
LOW…code_examples/pydantic_ai_crawler/debugging_example.py44 # Set abort_on_error to True to stop the crawl if an error occurs duringCOMMENT
LOW…les/code_examples/respect_robots_on_skipped_request.py22 # Check if the request was skipped due to robots.txt rulesCOMMENT
LOWsrc/crawlee/_utils/sitemap.py375 # Check if the first chunk is a valid gzip headerCOMMENT
LOWsrc/crawlee/_utils/file.py199 # Set lineterminator to '\n' if not explicitly provided. This prevents double line endings on Windows.COMMENT
LOWsrc/crawlee/_utils/file.py209 # Iterate over the dataset and write to CSV.COMMENT
LOWsrc/crawlee/crawlers/_playwright/_playwright_crawler.py567 # Check if the session is blocked based on the response contentCOMMENT
LOWsrc/crawlee/http_clients/_curl_impersonate.py292 # Check if a session for the given proxy URL has already been created.COMMENT
LOWsrc/crawlee/project_template/hooks/pre_gen_project.py17# Check if package manager is available in PATHCOMMENT
LOWsrc/crawlee/project_template/hooks/pre_gen_project.py22# Check if the package manager is executableCOMMENT
LOWsrc/crawlee/project_template/hooks/pre_gen_project.py29# Check if the version matches the required regexCOMMENT
LOW…/crawlee/storage_clients/_sql/_request_queue_client.py604 # Check if there are any unhandled requests that are not blocked.COMMENT
LOW…/crawlee/storage_clients/_sql/_request_queue_client.py643 # Check if there are any buffered updates that might change the pending countCOMMENT
LOW…rawlee/storage_clients/_sql/_key_value_store_client.py292 # Check if record existsCOMMENT
LOW…rawlee/storage_clients/_redis/_request_queue_client.py508 # Check if there are any requests in the queue.COMMENT
LOW…/storage_clients/_file_system/_request_queue_client.py342 # Check if the request has already been handled.COMMENT
LOW…/storage_clients/_file_system/_request_queue_client.py351 # Check if the request is already in progress.COMMENT
LOW…/storage_clients/_file_system/_request_queue_client.py490 # Check if the request is in progress.COMMENT
LOW…/storage_clients/_file_system/_request_queue_client.py538 # Check if the request is in progress.COMMENT
LOW…/storage_clients/_file_system/_request_queue_client.py797 # Read the file content and parse it as JSON.COMMENT
LOW…/storage_clients/_file_system/_request_queue_client.py839 # Check if request was already handledCOMMENT
LOW…torage_clients/_file_system/_key_value_store_client.py372 # Check if the KVS directory existsCOMMENT
LOW…awlee/storage_clients/_memory/_request_queue_client.py149 # Check if the request is already in the queue by unique_key.COMMENT
LOW…awlee/storage_clients/_memory/_request_queue_client.py249 # Check if the request is in progress.COMMENT
LOW…awlee/storage_clients/_memory/_request_queue_client.py286 # Check if the request is in progress.COMMENT
LOWsrc/crawlee/_autoscaling/snapshotter.py423 # Check if the warning has been logged recently to avoid spammingCOMMENT
LOWsrc/crawlee/request_loaders/_sitemap_request_loader.py392 # Check if URL should be includedCOMMENT
LOWsrc/crawlee/request_loaders/_sitemap_request_loader.py399 # Check if we have capacity in the queueCOMMENT
Modern Structural Boilerplate59 hits · 60 pts
SeverityFileLineSnippetContext
LOW…/playwright_crawler/browser_pool_page_hooks_example.py16logger = logging.getLogger(__name__)CODE
LOW…laywright_crawler/browser_pool_launch_hooks_example.py14logger = logging.getLogger(__name__)CODE
LOW…mples/request_loaders/rl_basic_example_with_persist.py8logger = logging.getLogger(__name__)CODE
LOW…amples/request_loaders/sitemap_example_with_persist.py9logger = logging.getLogger(__name__)CODE
LOWtests/unit/conftest.py97def _set_crawler_log_level(pytestconfig: pytest.Config, monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/unit/server.py154async def set_cookies(scope: dict[str, Any], _receive: Receive, send: Send) -> None:CODE
LOWtests/unit/server.py373async def set_complex_cookies(_scope: dict[str, Any], _receive: Receive, send: Send) -> None:CODE
LOW…/playwright_crawler/browser_pool_page_hooks_example.py16logger = logging.getLogger(__name__)CODE
LOW…laywright_crawler/browser_pool_launch_hooks_example.py14logger = logging.getLogger(__name__)CODE
LOW…mples/request_loaders/rl_basic_example_with_persist.py8logger = logging.getLogger(__name__)CODE
LOW…amples/request_loaders/sitemap_example_with_persist.py9logger = logging.getLogger(__name__)CODE
LOWsrc/crawlee/configuration.py16__all__ = ['Configuration']CODE
LOWsrc/crawlee/__init__.py10__all__ = [CODE
LOWsrc/crawlee/proxy_configuration.py21__all__ = ['ProxyConfiguration', 'ProxyInfo']CODE
LOWsrc/crawlee/errors.py10__all__ = [CODE
LOWsrc/crawlee/router.py11__all__ = ['Router']CODE
LOWsrc/crawlee/_service_locator.py46 def set_configuration(self, configuration: Configuration) -> None:CODE
LOWsrc/crawlee/_service_locator.py76 def set_event_manager(self, event_manager: EventManager) -> None:CODE
LOWsrc/crawlee/_service_locator.py106 def set_storage_client(self, storage_client: StorageClient) -> None:CODE
LOWsrc/crawlee/statistics/__init__.py4__all__ = ['FinalStatistics', 'Statistics', 'StatisticsState']CODE
LOWsrc/crawlee/fingerprint_suite/__init__.py6__all__ = [CODE
LOWsrc/crawlee/storages/__init__.py5__all__ = [CODE
LOWsrc/crawlee/storages/_dataset.py29logger = logging.getLogger(__name__)CODE
LOWsrc/crawlee/crawlers/__init__.py99__all__ = [CODE
LOWsrc/crawlee/crawlers/_basic/__init__.py5__all__ = [CODE
LOWsrc/crawlee/crawlers/_beautifulsoup/__init__.py15__all__ = [CODE
LOWsrc/crawlee/crawlers/_parsel/__init__.py13__all__ = [CODE
LOWsrc/crawlee/crawlers/_pydantic_ai/_types.py95 def set_ai_usage(self, value: PydanticAiUsageStats) -> None:CODE
LOWsrc/crawlee/crawlers/_pydantic_ai/__init__.py29__all__ = [CODE
LOW…c/crawlee/crawlers/_pydantic_ai/_selector_extractor.py342 def set_ai_usage(self, value: PydanticAiUsageStats) -> None:CODE
LOWsrc/crawlee/crawlers/_pydantic_ai/_base_extractor.py65 def set_ai_usage(self, value: PydanticAiUsageStats) -> None:CODE
LOWsrc/crawlee/crawlers/_playwright/__init__.py17__all__ = [CODE
LOWsrc/crawlee/crawlers/_playwright/_playwright_crawler.py613 async def _update_cookies(self, page: Page, cookies: list[PlaywrightCookieParam]) -> None:CODE
LOWsrc/crawlee/crawlers/_stagehand/__init__.py20__all__ = [CODE
LOWsrc/crawlee/crawlers/_http/__init__.py6__all__ = [CODE
LOWsrc/crawlee/crawlers/_adaptive_playwright/__init__.py22__all__ = [CODE
LOWsrc/crawlee/crawlers/_abstract_http/__init__.py5__all__ = [CODE
LOWsrc/crawlee/otel/__init__.py3__all__ = [CODE
LOWsrc/crawlee/http_clients/_curl_impersonate.py48 def update_cookies_from_curl(self, morsels: list[CurlMorsel]) -> None:CODE
LOWsrc/crawlee/http_clients/__init__.py19__all__ = [CODE
LOWsrc/crawlee/browsers/__init__.py28__all__ = [CODE
LOWsrc/crawlee/sessions/_cookies.py210 def set_cookies(self, cookie_dicts: list[CookieParam]) -> None:CODE
LOWsrc/crawlee/sessions/_cookies.py224 def set_cookies_from_playwright_format(self, pw_cookies: list[PlaywrightCookieParam]) -> None:CODE
LOWsrc/crawlee/sessions/__init__.py5__all__ = ['CookieParam', 'Session', 'SessionCookies', 'SessionPool']CODE
LOWsrc/crawlee/storage_clients/__init__.py19__all__ = [CODE
LOW…rawlee/storage_clients/_sql/_key_value_store_client.py149 async def set_value(self, *, key: str, value: Any, content_type: str | None = None) -> None:CODE
LOWsrc/crawlee/storage_clients/_sql/__init__.py6__all__ = ['SqlDatasetClient', 'SqlKeyValueStoreClient', 'SqlRequestQueueClient', 'SqlStorageClient']CODE
LOW…wlee/storage_clients/_redis/_key_value_store_client.py125 async def set_value(self, *, key: str, value: Any, content_type: str | None = None) -> None:CODE
LOWsrc/crawlee/storage_clients/_redis/__init__.py6__all__ = ['RedisDatasetClient', 'RedisKeyValueStoreClient', 'RedisRequestQueueClient', 'RedisStorageClient']CODE
LOW…torage_clients/_file_system/_key_value_store_client.py302 async def set_value(self, *, key: str, value: Any, content_type: str | None = None) -> None:CODE
LOWsrc/crawlee/storage_clients/_file_system/__init__.py6__all__ = [CODE
LOW…lee/storage_clients/_memory/_key_value_store_client.py112 async def set_value(self, *, key: str, value: Any, content_type: str | None = None) -> None:CODE
LOWsrc/crawlee/storage_clients/_memory/__init__.py6__all__ = [CODE
LOW…awlee/storage_clients/_base/_key_value_store_client.py53 async def set_value(self, *, key: str, value: Any, content_type: str | None = None) -> None:CODE
LOWsrc/crawlee/storage_clients/_base/__init__.py6__all__ = [CODE
LOWsrc/crawlee/events/__init__.py15__all__ = [CODE
LOWsrc/crawlee/_autoscaling/__init__.py5__all__ = ['AutoscaledPool', 'Snapshotter', 'SystemStatus']CODE
LOWsrc/crawlee/request_loaders/__init__.py8__all__ = [CODE
LOW…crawlee/request_loaders/_throttling_request_manager.py339 def set_crawl_delay(self, url: str, delay_seconds: int) -> None:CODE
Excessive Try-Catch Wrapping45 hits · 46 pts
SeverityFileLineSnippetContext
LOW…ing_web_archive/manual_archiving_playwright_crawler.py28 except Exception as e:CODE
LOWtests/unit/_statistics/test_error_tracker.py34 except Exception as e: # noqa:PERF203CODE
LOWtests/unit/_statistics/test_error_tracker.py39 except Exception as e:CODE
LOWtests/unit/_statistics/test_error_tracker.py69 except Exception as e: # noqa:PERF203CODE
LOWtests/unit/_statistics/test_error_tracker.py98 except Exception as e:CODE
LOWtests/unit/_statistics/test_error_tracker.py110 except Exception as e:CODE
LOWtests/unit/_statistics/test_error_tracker.py113 except Exception as e:CODE
LOWtests/unit/storages/test_request_queue.py707 except Exception:CODE
LOWtests/unit/crawlers/_parsel/test_parsel_crawler.py101 except Exception as e:CODE
LOW…s/unit/crawlers/_playwright/test_playwright_crawler.py151 except Exception as e:CODE
LOW…ing_web_archive/manual_archiving_playwright_crawler.py28 except Exception as e:CODE
LOWsrc/crawlee/_cli.py240 except Exception as exc:CODE
LOWsrc/crawlee/proxy_configuration.py186 except Exception as e:CODE
LOWsrc/crawlee/statistics/_error_tracker.py104 except Exception:CODE
LOWsrc/crawlee/_utils/sitemap.py189 except Exception as e:CODE
LOWsrc/crawlee/_utils/sitemap.py202 except Exception as e:CODE
LOWsrc/crawlee/_utils/sitemap.py332 except Exception as e:CODE
LOWsrc/crawlee/_utils/sitemap.py412 except Exception as e:CODE
LOWsrc/crawlee/_utils/sitemap.py547 except Exception:CODE
LOWsrc/crawlee/_utils/sitemap.py619 except Exception:CODE
LOWsrc/crawlee/_utils/wait.py40 except Exception as e:CODE
LOWsrc/crawlee/_utils/wait.py85 except Exception as e:CODE
LOWsrc/crawlee/_utils/recurring_task.py56 except Exception:CODE
LOWsrc/crawlee/_utils/file.py58 except Exception:CODE
LOWsrc/crawlee/_utils/requests.py82 except Exception as exc:CODE
LOWsrc/crawlee/_utils/robots.py67 except Exception as e:CODE
LOWsrc/crawlee/storages/_request_queue.py70 except Exception:STRING
LOWsrc/crawlee/crawlers/_basic/_basic_crawler.py1171 except Exception as e:CODE
LOWsrc/crawlee/crawlers/_basic/_basic_crawler.py1200 except Exception as secondary_error:CODE
LOWsrc/crawlee/crawlers/_basic/_basic_crawler.py1222 except Exception as e:CODE
LOWsrc/crawlee/crawlers/_basic/_basic_crawler.py1237 except Exception as e:CODE
LOWsrc/crawlee/crawlers/_basic/_basic_crawler.py1509 except Exception as internal_error:CODE
LOWsrc/crawlee/crawlers/_basic/_basic_crawler.py1521 except Exception: # noqa: PERF203CODE
LOWsrc/crawlee/crawlers/_basic/_context_pipeline.py50 except Exception as e:CODE
LOWsrc/crawlee/crawlers/_basic/_context_pipeline.py107 except Exception as e:CODE
LOWsrc/crawlee/crawlers/_basic/_context_pipeline.py118 except Exception as e:CODE
LOW…rs/_playwright/_playwright_pre_nav_crawling_context.py39 except Exception:CODE
LOW…rs/_playwright/_playwright_pre_nav_crawling_context.py44 except Exception:CODE
LOW…s/_adaptive_playwright/_adaptive_playwright_crawler.py339 except Exception as e:CODE
LOWsrc/crawlee/browsers/_browser_pool.py374 except Exception:CODE
LOWsrc/crawlee/browsers/_stagehand_browser_controller.py182 except Exception:CODE
LOW…rawlee/storage_clients/_redis/_request_queue_client.py437 except Exception:CODE
LOWsrc/crawlee/events/_event_manager.py192 except Exception:CODE
LOWsrc/crawlee/request_loaders/_sitemap_request_loader.py421 except Exception:CODE
LOWsrc/crawlee/request_loaders/_request_manager_tandem.py87 except Exception:CODE
AI Response Leakage6 hits · 45 pts
SeverityFileLineSnippetContext
HIGH…rsion-1.8/examples/code_examples/playwright_crawler.py56 # browser page among other things. In this example, we log the URL beingCOMMENT
HIGH…-1.8/examples/code_examples/respect_robots_txt_file.py19 # In this example, 'https://news.ycombinator.com/login' will be skippedCOMMENT
HIGH…rsion-0.6/examples/code_examples/playwright_crawler.py56 # browser page among other things. In this example, we log the URL beingCOMMENT
HIGH…-0.6/examples/code_examples/respect_robots_txt_file.py19 # In this example, 'https://news.ycombinator.com/login' will be skippedCOMMENT
HIGHdocs/examples/code_examples/playwright_crawler.py56 # browser page among other things. In this example, we log the URL beingCOMMENT
HIGHdocs/examples/code_examples/respect_robots_txt_file.py19 # In this example, 'https://news.ycombinator.com/login' will be skippedCOMMENT
Deep Nesting39 hits · 38 pts
SeverityFileLineSnippetContext
LOWtests/e2e/project_template/utils.py58CODE
LOWsrc/crawlee/_cli.py126CODE
LOWsrc/crawlee/_utils/globs.py19CODE
LOWsrc/crawlee/_utils/globs.py76CODE
LOWsrc/crawlee/_utils/sitemap.py229CODE
LOWsrc/crawlee/_utils/sitemap.py338CODE
LOWsrc/crawlee/_utils/sitemap.py465CODE
LOWsrc/crawlee/_utils/sitemap.py568CODE
LOWsrc/crawlee/_utils/sitemap.py107CODE
LOWsrc/crawlee/_utils/wait.py49CODE
LOWsrc/crawlee/_utils/urls.py42CODE
LOWsrc/crawlee/storages/_storage_instance_manager.py40CODE
LOWsrc/crawlee/crawlers/_basic/_basic_crawler.py1071CODE
LOWsrc/crawlee/crawlers/_basic/_basic_crawler.py1147CODE
LOWsrc/crawlee/crawlers/_basic/_basic_crawler.py1559CODE
LOWsrc/crawlee/crawlers/_basic/_context_pipeline.py82CODE
LOWsrc/crawlee/crawlers/_beautifulsoup/_utils.py20CODE
LOWsrc/crawlee/crawlers/_beautifulsoup/_utils.py38CODE
LOWsrc/crawlee/crawlers/_parsel/_utils.py16CODE
LOWsrc/crawlee/crawlers/_parsel/_utils.py34CODE
LOW…crawlee/crawlers/_pydantic_ai/_clean_html_distiller.py176CODE
LOW…c/crawlee/crawlers/_pydantic_ai/_selector_extractor.py656CODE
LOWsrc/crawlee/sessions/_cookies.py63CODE
LOWsrc/crawlee/sessions/_session.py94CODE
LOWsrc/crawlee/storage_clients/_sql/_storage_client.py112CODE
LOW…/crawlee/storage_clients/_sql/_request_queue_client.py207CODE
LOW…rawlee/storage_clients/_sql/_key_value_store_client.py149CODE
LOW…rawlee/storage_clients/_sql/_key_value_store_client.py191CODE
LOW…wlee/storage_clients/_redis/_key_value_store_client.py125CODE
LOW…/storage_clients/_file_system/_request_queue_client.py154CODE
LOW…/storage_clients/_file_system/_request_queue_client.py322CODE
LOW…torage_clients/_file_system/_key_value_store_client.py90CODE
LOW…torage_clients/_file_system/_key_value_store_client.py223CODE
LOW…torage_clients/_file_system/_key_value_store_client.py302CODE
LOW…rawlee/storage_clients/_file_system/_dataset_client.py92CODE
LOW…awlee/storage_clients/_memory/_request_queue_client.py141CODE
LOWsrc/crawlee/_autoscaling/autoscaled_pool.py105CODE
LOWsrc/crawlee/_autoscaling/autoscaled_pool.py213CODE
LOWsrc/crawlee/request_loaders/_sitemap_request_loader.py341CODE
AI Structural Patterns29 hits · 28 pts
SeverityFileLineSnippetContext
LOWsrc/crawlee/_types.py387CODE
LOWsrc/crawlee/_types.py412CODE
LOWsrc/crawlee/_request.py244CODE
LOWsrc/crawlee/statistics/_statistics.py71CODE
LOWsrc/crawlee/statistics/_statistics.py127CODE
LOWsrc/crawlee/fingerprint_suite/_browserforge_adapter.py56CODE
LOWsrc/crawlee/storages/_dataset.py150CODE
LOWsrc/crawlee/storages/_dataset.py201CODE
LOWsrc/crawlee/storages/_dataset.py249CODE
LOWsrc/crawlee/crawlers/_basic/_basic_crawler.py279CODE
LOWsrc/crawlee/crawlers/_basic/_basic_crawler.py1026CODE
LOW…crawlee/crawlers/_pydantic_ai/_clean_html_distiller.py71CODE
LOW…c/crawlee/crawlers/_pydantic_ai/_selector_extractor.py290CODE
LOW…c/crawlee/crawlers/_pydantic_ai/_skeleton_distiller.py64CODE
LOWsrc/crawlee/crawlers/_playwright/_playwright_crawler.py117CODE
LOWsrc/crawlee/crawlers/_stagehand/_stagehand_crawler.py94CODE
LOWsrc/crawlee/sessions/_session.py36CODE
LOW…/crawlee/storage_clients/_sql/_request_queue_client.py682CODE
LOWsrc/crawlee/storage_clients/_sql/_dataset_client.py163CODE
LOWsrc/crawlee/storage_clients/_sql/_dataset_client.py210CODE
LOWsrc/crawlee/storage_clients/_sql/_dataset_client.py243CODE
LOWsrc/crawlee/storage_clients/_redis/_dataset_client.py146CODE
LOWsrc/crawlee/storage_clients/_redis/_dataset_client.py232CODE
LOW…rawlee/storage_clients/_file_system/_dataset_client.py243CODE
LOW…rawlee/storage_clients/_file_system/_dataset_client.py342CODE
LOWsrc/crawlee/storage_clients/_memory/_dataset_client.py138CODE
LOWsrc/crawlee/storage_clients/_memory/_dataset_client.py197CODE
LOWsrc/crawlee/storage_clients/_base/_dataset_client.py55CODE
LOWsrc/crawlee/storage_clients/_base/_dataset_client.py76CODE
Decorative Section Separators6 hits · 24 pts
SeverityFileLineSnippetContext
MEDIUMtests/unit/test_throttling_request_manager.py141# ── Core Throttling Tests ─────────────────────────────────COMMENT
MEDIUMtests/unit/test_throttling_request_manager.py240# ── Crawl-Delay Integration Tests ─────────────────────────COMMENT
MEDIUMtests/unit/test_throttling_request_manager.py262# ── Fetch Scheduling Tests ────────────────────────────COMMENT
MEDIUMtests/unit/test_throttling_request_manager.py530# ── Utility Tests ──────────────────────────────────────COMMENT
MEDIUMtests/unit/test_throttling_request_manager.py58# ── Request Routing Tests ─────────────────────────────────COMMENT
MEDIUMtests/unit/test_throttling_request_manager.py372# ── Delegation Tests ────────────────────────────────────COMMENT
AI Slop Vocabulary12 hits · 21 pts
SeverityFileLineSnippetContext
LOW…ersion-1.8/introduction/code_examples/07_final_code.py16 # We're not processing detail pages yet, so we just pass.COMMENT
LOW…/version-1.8/introduction/code_examples/06_scraping.py16 # We're not processing detail pages yet, so we just pass.COMMENT
LOW…n-1.8/introduction/code_examples/05_crawling_detail.py13 # We're not processing detail pages yet, so we just pass.COMMENT
MEDIUM…ides/code_examples/http_crawlers/selectolax_context.py10# to facilitate working with the parsed document.COMMENT
LOW…ersion-0.6/introduction/code_examples/07_final_code.py16 # We're not processing detail pages yet, so we just pass.COMMENT
LOW…/version-0.6/introduction/code_examples/06_scraping.py16 # We're not processing detail pages yet, so we just pass.COMMENT
LOW…n-0.6/introduction/code_examples/05_crawling_detail.py13 # We're not processing detail pages yet, so we just pass.COMMENT
LOWdocs/introduction/code_examples/07_final_code.py16 # We're not processing detail pages yet, so we just pass.COMMENT
LOWdocs/introduction/code_examples/06_scraping.py16 # We're not processing detail pages yet, so we just pass.COMMENT
LOWdocs/introduction/code_examples/05_crawling_detail.py13 # We're not processing detail pages yet, so we just pass.COMMENT
MEDIUM…ides/code_examples/http_crawlers/selectolax_context.py10# to facilitate working with the parsed document.COMMENT
LOWsrc/crawlee/events/_event_manager.py176 # If the listener is a coroutine function, just call it, otherwise, run it in a separate threadCOMMENT
Slop Phrases5 hits · 14 pts
SeverityFileLineSnippetContext
MEDIUM…ides/code_examples/http_crawlers/selectolax_context.py9# Custom context for Selectolax parser, you can add your own methods hereCOMMENT
MEDIUM…ides/code_examples/http_crawlers/selectolax_crawler.py20# Custom crawler using custom context, It is optional and you can useCOMMENT
LOW…e2e/project_template/test_static_crawlers_templates.py15# To run these tests locally, make sure you have apify-cli installed and available in the path.COMMENT
MEDIUM…ides/code_examples/http_crawlers/selectolax_context.py9# Custom context for Selectolax parser, you can add your own methods hereCOMMENT
MEDIUM…ides/code_examples/http_crawlers/selectolax_crawler.py20# Custom crawler using custom context, It is optional and you can useCOMMENT
Over-Commented Block10 hits · 10 pts
SeverityFileLineSnippetContext
LOWwebsite/docusaurus.config.js121 },COMMENT
LOWwebsite/docusaurus.config.js141 // to: '/docs/introduction',COMMENT
LOWwebsite/sidebars.js81 type: 'autogenerated',COMMENT
LOWwebsite/src/components/Highlights.jsx61 // or plug an adapter for your DB. Your URLs are <a href="https://crawlee.dev/docs/guides/request-storagCOMMENT
LOW…emplate/{{cookiecutter.project_name}}/requirements.txt1# % if cookiecutter.crawler_type == 'playwright-camoufox'COMMENT
LOW…_template/{{cookiecutter.project_name}}/pyproject.toml1# % if cookiecutter.crawler_type.startswith('adaptive-')COMMENT
LOW…oject_name}}/{{cookiecutter.__package_name}}/routes.py1# % if cookiecutter.crawler_type.startswith('playwright')COMMENT
LOWsrc/crawlee/project_template/hooks/post_gen_project.py41COMMENT
LOWsrc/crawlee/project_template/templates/main.py1# % if cookiecutter.enable_apify_integrationCOMMENT
LOWsrc/crawlee/project_template/templates/main.py21http_client=HttpxHttpClient(),COMMENT
Fake / Example Data8 hits · 8 pts
SeverityFileLineSnippetContext
LOW…ples/code_examples/fill_and_submit_web_form_request.py15 'custname': 'John Doe',CODE
LOW…ples/code_examples/fill_and_submit_web_form_crawler.py25 'custname': 'John Doe',CODE
LOW…ples/code_examples/fill_and_submit_web_form_request.py15 'custname': 'John Doe',CODE
LOW…ples/code_examples/fill_and_submit_web_form_crawler.py25 'custname': 'John Doe',CODE
LOWtests/unit/crawlers/_http/test_http_crawler.py28 'custname': 'John Doe',CODE
LOW…ples/code_examples/fill_and_submit_web_form_request.py15 'custname': 'John Doe',CODE
LOW…ples/code_examples/fill_and_submit_web_form_crawler.py25 'custname': 'John Doe',CODE
LOW…crawlee/crawlers/_pydantic_ai/_clean_html_distiller.py35 'placeholder',CODE
Dead Code3 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMtests/unit/crawlers/_basic/test_context_pipeline.py150CODE
MEDIUM…awlee/storage_clients/_base/_key_value_store_client.py79CODE
MEDIUMsrc/crawlee/storage_clients/_base/_dataset_client.py95CODE
Cross-Language Confusion1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHtests/unit/server_endpoints.py127 if (loading || page >= 3) return;CODE
Overly Generic Function Names4 hits · 4 pts
SeverityFileLineSnippetContext
LOW…/code_examples/http_crawlers/selectolax_crawler_run.py12 async def handle_request(context: SelectolaxLexborContext) -> None:CODE
LOW…code_examples/http_crawlers/selectolax_adaptive_run.py19 async def handle_request(context: AdaptivePlaywrightCrawlingContext) -> None:CODE
LOW…/code_examples/http_crawlers/selectolax_crawler_run.py12 async def handle_request(context: SelectolaxLexborContext) -> None:CODE
LOW…code_examples/http_crawlers/selectolax_adaptive_run.py19 async def handle_request(context: AdaptivePlaywrightCrawlingContext) -> None:CODE