Skip to content

Latest commit

 

History

History
58 lines (34 loc) · 4.29 KB

File metadata and controls

58 lines (34 loc) · 4.29 KB
graph LR
    Scrapy_Engine["Scrapy Engine"]
    Scrapy_Proxy_Middleware_RandomProxy_["Scrapy Proxy Middleware (RandomProxy)"]
    Scrapy_Configuration_Loader["Scrapy Configuration Loader"]
    Proxy_List_Source["Proxy List Source"]
    Scrapy_Engine -- "Sends Request" --> Scrapy_Proxy_Middleware_RandomProxy_
    Scrapy_Proxy_Middleware_RandomProxy_ -- "Returns Modified Request/Handles Exception" --> Scrapy_Engine
    Scrapy_Configuration_Loader -- "Configures" --> Scrapy_Proxy_Middleware_RandomProxy_
    Proxy_List_Source -- "Provides Proxy List" --> Scrapy_Proxy_Middleware_RandomProxy_
    click Scrapy_Proxy_Middleware_RandomProxy_ href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/scrapy-proxies/Scrapy_Proxy_Middleware_RandomProxy_.md" "Details"
    click Scrapy_Configuration_Loader href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/scrapy-proxies/Scrapy_Configuration_Loader.md" "Details"
    click Proxy_List_Source href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/scrapy-proxies/Proxy_List_Source.md" "Details"
Loading

CodeBoardingDemoContact

Details

The scrapy-proxies library integrates seamlessly with the Scrapy framework, primarily through its Scrapy Proxy Middleware (RandomProxy) component. This middleware acts as a crucial intermediary, intercepting outgoing requests from the Scrapy Engine to inject proxy settings and managing proxy rotation and status. It relies on the Scrapy Configuration Loader to interpret proxy-related settings from the Scrapy project's configuration and obtains the list of available proxies from a Proxy List Source. The Scrapy Engine orchestrates the entire crawling process, sending requests that are modified by the middleware and receiving responses, thus enabling robust and flexible proxy management within Scrapy projects.

Scrapy Engine

The core Scrapy framework responsible for orchestrating the crawling process, sending requests, receiving responses, and managing the middleware chain. It interacts with the Scrapy Proxy Middleware by invoking its process_request and process_response methods.

Related Classes/Methods: None

Scrapy Proxy Middleware (RandomProxy) [Expand]

The central component of scrapy-proxies. It acts as a Scrapy downloader middleware, intercepting requests and responses to inject proxy settings, manage proxy selection, rotation, and status tracking.

Related Classes/Methods:

Scrapy Configuration Loader [Expand]

Responsible for loading and interpreting scrapy-proxies specific settings (e.g., PROXY_MODE, PROXY_LIST) from the Scrapy project's settings.py file. This component configures the Scrapy Proxy Middleware.

Related Classes/Methods:

Proxy List Source [Expand]

Represents the external source (typically a file or a URL) from which the list of available proxies is obtained and provided to the middleware.

Related Classes/Methods: