Closed iPromKnight closed 2 weeks ago
[!CAUTION]
Review failed
The pull request is closed.
The changes primarily involve enhancements to the Jackett and Prowlarr scrapers in the jackett.py
and prowlarr.py
modules. Key updates include the introduction of the get_http_adapter
function to facilitate the creation of HTTP adapters for service sessions, improving connection pooling and error handling. The validate
method in both modules has been refined to provide more specific logging for various initialization errors. Additionally, the return type of the run
method in jackett.py
has been modified for consistency, ensuring it returns an empty dictionary instead of an empty set upon failure.
File Path | Change Summary |
---|---|
src/program/services/scrapers/jackett.py | - Introduced get_http_adapter for HTTP session creation. - Updated create_service_session to include session_adapter . - Enhanced error logging in validate . - Modified run to return an empty dictionary on scrape failure. |
src/program/services/scrapers/prowlarr.py | - Added import for get_http_adapter . - Updated validate to use http_adapter for session creation and improved error logging. |
sequenceDiagram
participant User
participant Jackett
participant Prowlarr
participant HTTPAdapter
User->>Jackett: Initialize Scraper
Jackett->>HTTPAdapter: get_http_adapter()
HTTPAdapter-->>Jackett: Return HTTP Adapter
Jackett->>Jackett: create_service_session(http_adapter)
Jackett->>Jackett: validate()
Jackett->>User: Return Success/Error Log
User->>Prowlarr: Initialize Scraper
Prowlarr->>HTTPAdapter: get_http_adapter()
HTTPAdapter-->>Prowlarr: Return HTTP Adapter
Prowlarr->>Prowlarr: create_service_session(http_adapter)
Prowlarr->>Prowlarr: validate()
Prowlarr->>User: Return Success/Error Log
🐇 In the fields where scrapers play,
New adapters come to save the day.
With logs so clear and errors few,
Jackett and Prowlarr, we cheer for you!
Hopping through code, we dance with glee,
For robust changes, oh so free! 🌼
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Bug Fixes
Improvements