21 Commits

Author SHA1 Message Date
mhdzumair 6b827aa4ba refactor: improve season and episode parsing with enhanced regex patterns and fallback logic 2025-03-04 14:55:00 +05:30
mhdzumair d7c7574bb1 Add support for scraping debrid cache status from Torrentio & Upstream MediaFusion 2025-02-24 00:19:31 +05:30
mhdzumair 783ef37883 Add support for storing special season and episode number 2025-02-17 00:44:49 +05:30
mhdzumair 01bb0390b2 Refactor episode handling to support multiple variants of episode files in single torrent 2025-01-22 09:16:02 +05:30
mhdzumair 32d675b173 Refactor adult content filtering logic to enforce more keywords on stream request 2025-01-17 06:51:09 +05:30
mhdzumair 2b23feb893 Fix season number validation in prowlarr scraper 2025-01-02 12:56:56 +05:30
mhdzumair 03297f2b22 Refactor database structure for metadata handling and episode processing.
Update Crud functions for new database structure & utlize 10x performance in the catalog data fetchers with new db structure and mongodb indexes. Added support for multi season pack torrents, Updated metadata handling to use a centralized fetching mechanism and improved filters for matching existing entries. Refactored episode processing logic to account for season and episode numbers more flexibly. Enhanced querying pipelines for better performance in catalog and metadata retrieval.
2024-12-30 13:45:03 +05:30
mhdzumair 70e8d1946b Add support for private, semi-private, and webseed torrent types for prowlarr & jackett & Manual imports; store torrent file content
- Updated streaming providers to allow adding torrents by file for webseed and private torrents.
- Implemented functionality to store the content of torrent files.
2024-12-22 18:21:58 +05:30
mhdzumair a0147cd67c Add jackett feed scraper and background scraper & enhance prowlarr feed scrapers 2024-12-22 00:12:17 +05:30
mhdzumair 60c00a41d5 Add Jackett scraper and enhance Prowlarr scraper integration & Refactorings common codes
Introduced a new Jackett scraper to support torrent indexers and refactored Prowlarr scraper for consistency. Enhanced support for advanced individual indexer searching, searching capability with category validation, and healthy indexer management across both scrapers.
2024-12-22 00:09:32 +05:30
mhdzumair ffd254d338 Add is_expected_to_fail flag to make_request method
This update allows handling expected 404 errors without raising exceptions. Updated all relevant calls in the `bt4g` scraper to use this flag where applicable, improving error handling for requests likely to return 404 responses.
2024-12-16 17:14:48 +05:30
mhdzumair 174d053774 Add BT4G on-demand scraper integration for torrent stream
This commit introduces the BT4G scraper to assist in scraping torrent streams for both movies and series. It includes new configuration options, caching mechanisms, and processing logic tailored for the BT4G platform. Additional settings around scraper limits and filtering have been added to ensure robust and efficient integration.
2024-12-16 10:12:02 +05:30
mhdzumair 1483336adc Refactor Redis client imports and configuration
Moved Redis client setup to a new module `redis_database` and updated all references across the codebase. Also added a new configuration setting for redis_max_connections for better resource management.
2024-11-28 16:08:34 +05:30
mhdzumair 23a07683fc Simplify metrics logging 2024-11-23 00:01:57 +05:30
mhdzumair c0878dac17 Add adult content filter for torrent titles with parsett & validate episode file with is_video_file 2024-11-21 16:01:15 +05:30
Mohamed Zumair ecf69fe969 Enhanced scraping capabilities with improved indexer search with health checks and metrics tracking (#367)
* Add support for comprehensive scraper metrics tracking

Renamed scrape_and_parse to _scrape_and_parse, adding comprehensive error handling and logging metrics for various scenarios like timeouts, HTTP errors, and validation issues. Incorporated a metrics class in base_scraper.py to summarize statistics related to scraping performance, which is now used across different scrapers including prowlarr, torrentio, and zilean.

* Enhance Prowlarr individual indexer searching logic with indexer healthcheck management & comprehensive metrics summary

Added detailed health checks for indexers and included their statuses in logging. Enhanced background search to use circuit breakers and handle indexers in chunks, improving reliability and fault tolerance.

* Handle custom id items with imdb id based on title and year matching for moving to imdb title

* handle exception onf fetching prowlarr indexer torrent page fetching

* Refactor Circuit Breaker and add state management methods

Reorganized Circuit Breaker class for better clarity and maintainability. Added methods to manage states (`is_closed`, `reset`, `record_failure`, `record_success`) and refactored `call` method to utilize these state checks. Enhanced logging and status reporting with `get_status` method.

* Simplify series metadata & episode data retrieval logic

Streamlined the `get_series_meta` function by removing complex filtering conditions and reducing the aggregation pipeline.

* Refactor CircuitBreaker for web scraping and enhanced recovery
2024-11-21 13:02:30 +05:30
Mohamed Zumair 95f57a9da8 Bugfixes (#330)
* Fix catalog parser for tamilmv & tamilblasters with ESub

* Avoid scraping zipx torrents

* Fix rpdb logging var, increase title ratio matching & cleanup
2024-10-19 22:53:55 +05:30
Mohamed Zumair 52d8956034 Add ScrapeOps monitoring, Add zilean filtered endpoint, Fix Prowlarr scraping with download link & Fix PikPak login error etc (#319)
* Refactor ZileanScraper to use parallel requests for searching and filtering streams with new endpoints

* Fix DLHD scraping & enable DLHD without MediaFlow

* Switch to httpx for async HTTP requests

* Implement caching for PikPak token to reduce login error

* Refactor torrent cleanup logic

* Add inactivity monitor extension to close idle spiders

Introduced `InactivityMonitor` to automatically close spiders that remain inactive for a specified time. This extension checks activity at regular intervals and uses configurable settings for check intervals and inactivity timeouts. If no items are scraped within the timeout period, the spider is closed to free resources.

* Handle TypeError in dynamic sorting of streams

* Refactor torrent info scraper to support pre-processing.

Introduced a pre-processing function mapping to handle specific indexer requirements before parsing the HTML. Added a custom pre-processing function for "TheRARBG" to handle URL adjustments, improving modularity and readability in the `get_torrent_info` function.

* Refine error logging and fix hash key in spider

* Fix Prowlarr not stop on max process limit

* #315: Integrate ScrapeOps logging into all scrapers & spiders

Added ScrapeOps logging to Zilean, Torrentio, Prowlarr, and Prowlarr Feed scrapers to enhance request tracking and error handling. Configured ScrapeOps API key in settings and updated Pipfile/Pipfile.lock with scrapeops-python-requests and scrapeops-scrapy dependencies.

* Refactor scraper cache status handler

* verify torrent before parsing on prowlarr & prioritize magnet on badass_torrents

* Add support for provide locally hosted mediaflow proxy public address and reduce the time leg on private ip address checking

* handle RD exception cases

* do not setup scrapeops when api key is none

* Enhanced dynamic sorting of torrent streams

Revised the dynamic_sort_key function to handle different key types more efficiently with match-case. Simplified error handling and improved logging to capture sorting data in the case of exceptions.

* add missing last update date for metadata

* update domain for nowmesports
2024-10-14 05:58:23 +05:30
Mohamed Zumair f2be00dec5 Fix prowlarr scrape based on the magnet link & fix movie contain series (#317) 2024-10-10 06:52:59 +05:30
mhdzumair ef968e02ab reduce verbose logs 2024-09-29 11:31:25 +05:30
Mohamed Zumair cf8ed59012 Added Prowlarr feed scraping & Improve Advanced scraping capability for prowlarr, zilean, torrentio & more bugfixes & improvements (#286)
* Update Python version

* Refactor Redis client

* WIP: Refactor scrapers

* Added Prowlarr feed scraping & Improve Advanced scraping capability for prowlarr, zilean, torrentio & more bugfixes & improvements

* Improve batch_process_with_circuit_breaker implementation to yield an individual task as soon as completed
2024-09-16 08:26:57 +05:30