128 Commits

Author SHA1 Message Date
Mohamed Zumair 991d312f5b Add support for DLHD playback with MediaFlow & fix debrid playback on external player with MediaFlow (#519) 2025-06-01 07:27:50 +05:30
mhdzumair 839866b4c1 Sports-video: Update scraping logic with new site changes 2025-02-23 20:24:33 +05:30
mhdzumair 8f7ee7b7d8 Update DLHD scraping logic according to new site changes 2025-02-15 09:49:34 +05:30
mhdzumair 4e1b2787b5 allow contribution streams to be considered as trusted store for tamilmv and tamilblasters 2025-01-22 09:16:02 +05:30
mhdzumair 4f7eff6edc allow contribution streams to be considered as trusted store for tamilmv and tamilblasters 2025-01-22 09:16:02 +05:30
mhdzumair 79a5fb1445 set expected sources to tamilmv & tamilblasters for not to override by other sources 2025-01-20 19:14:17 +05:30
mhdzumair a50688333a bugfix on conditional embed url check 2025-01-18 21:44:57 +05:30
mhdzumair 05eb6dd545 Refactor DLHD Live Sports Events scraping and storing the data
Reworked the caching logic to handle a missing cache key for "events" type gracefully. Integrated a new DLHD schedule service for improved event metadata and stream handling, leveraging fuzzy matching and IPTV-org data retrieval for enhanced TV channel mappings. Updated scraper configuration, enhanced genre handling, and added support for dynamic event descriptions.
2025-01-18 00:09:08 +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 44be68b564 Simplify sports metadata handling in scrapers
Refactored sports metadata validation by removing unnecessary fields like 'year' and making 'poster', 'background', and 'logo' optional with fallback values. Improved the handling of catalogs, series detection, and created conditional title adjustments. Updated UI and JSON artifacts to support individual WWE and UFC categories.
2025-01-09 07:22:51 +05:30
mhdzumair fe197b3397 Add support for using tmdb logo for wwe shows & fix data parsing issue with episodes 2025-01-01 13:42:14 +05:30
mhdzumair 2fc181a7b9 Handle expected source scraper mismatches when processing torrent streams from trusted scraper
This change now drops the existing data from an unknown source and re-scrapes the torrent data from trusted scraper
2025-01-01 13:40:17 +05:30
mhdzumair c1a029ae9e Add check to skip non-English catalogs from TorrentGalaxy
Previously, non-English catalogs were being processed for TorrentGalaxy sources, leading to incorrect catalog entries. This update ensures non-English catalogs from TorrentGalaxy are ignored, preserving data integrity. Other sources remain unaffected.
2024-12-31 19:52:34 +05:30
mhdzumair 12b7d29f10 Update default settings and scraper configurations 2024-12-30 14:14:13 +05:30
mhdzumair 11af39b371 Add shutdown signal count to force close scrapy spider after retries 2024-12-30 14:10:10 +05:30
mhdzumair 0a31561587 Add support to prioritize metadata fetcher method with either IMDb or TMDB
Revised TMDB data fetching with improved retry logic and error handling. Refactored metadata management for movies and series, simplifying pipelines and introducing extensibility. Introduced `meta_fetcher` for centralized metadata fetching, replacing scattered IMDb and TMDB logic.
2024-12-30 14:06:17 +05:30
mhdzumair 3945a65ba3 Enhance torrent file processing and validations
Updated the torrent parsing logic to add timestamp conversion, improve file data extraction, and refine metadata validation. Adjusted season and episode parsing for better accuracy in file metadata.
2024-12-30 14:02:59 +05:30
mhdzumair 4a58c846c3 Add support for hdr & uploader tags in stream details 2024-12-30 13:58:59 +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 10a6f2e051 Enhance metadata handling and optimize torrent processing
Added `parsed_data` support for more robust torrent metadata extraction and improved season/episode assignment logic. Refined IMDB integration to handle null ratings and streamline title-year searches. Database index and query filters updated for better flexibility and accuracy.
2024-12-22 00:13:31 +05:30
mhdzumair cdaf48f5a7 Fix TGX scraping 2024-12-20 23:02:51 +05:30
mhdzumair fbe34d3d1e update scrapy cache path 2024-12-20 23:02:51 +05:30
mhdzumair 863247018d Add dramatiq-abort support and extend scrapy CloseSpider to abort the dramatiq worker on stale spiders
Integrate `dramatiq-abort` with Redis backend for task abortion and enhance the `CloseSpider` extension to abort jobs with no recent activity. These changes improve task management and error handling for idle spiders in the scraping process. Updated dependencies and project settings accordingly.
2024-12-15 23:01:24 +05:30
mhdzumair 65c6eda6e5 Update Scrapy settings 2024-12-14 21:45:06 +05:30
mhdzumair 7df0bdd23f Add Movies/TV TGX spider and scheduling support
Introduced `MoviesTVTgxSpider` for parsing TGx movie/TV torrents and added relevant pipelines for processing. Enhanced scheduler, constants, and configurations to support the new functionality. Made updates to improve torrent detail parsing and handle dynamic content loading using Playwright.
2024-12-14 21:40:45 +05:30
mhdzumair 176698ba16 Refactor metadata handling and episode organization logic
Improve clarity and consistency by refactoring metadata creation, episode organization, and calls related to IMDb searches. Centralize and reuse the `organize_episodes` functionality, removing redundant code and improving maintainability. Adjust pipelines for better handling of Redis connections and metadata attributes.
2024-12-14 21:36:51 +05:30
mhdzumair a220accb1a Refactor file size handling in FormulaParserPipeline 2024-12-14 21:34:27 +05:30
mhdzumair ff4be3865e Replaced get_imdb_movie_data with get_imdb_title for better naming consistency and added get_imdb_title_data to streamline IMDb metadata processing. Updated related code to accommodate these changes and ensure proper functionality of IMDb interactions. 2024-12-14 21:33:53 +05:30
mhdzumair 43e2c0ccac Refactor pipelines and improve catalog parser pipeline handling logic.
Removed unnecessary size conversion logic to simplify code and reduce dependencies. Enhanced catalog processing with validation against predefined data and prevented duplication. Adjusted logging levels for better error visibility in TMDB integration.
2024-12-14 21:24:06 +05:30
mhdzumair c477816fbf convert imdb scraping fully in async 2024-12-14 18:01:14 +05:30
mhdzumair 07a0c61d12 Fix TGX scrapy spiders & scrape file data with the magnet pipeline if the page provides wrong file information 2024-12-14 07:17:28 +05:30
mhdzumair b3e2ca8f64 Disable TGX page load verification temporarily due to site not backup fully 2024-12-13 19:03:58 +05:30
mhdzumair b2bbe4f5be Add TMDB integration for metadata retrieval and updates & utilize TMDB poster & background for UFC titles
Introduced TMDB API support to fetch and update movie and series metadata, replacing parts of IMDb-based functionality. Enhanced the sports parser pipeline to retrieve TMDB metadata for events, ensuring consistency in handling posters, backgrounds, and descriptions.
2024-12-13 17:43:16 +05:30
mhdzumair 44b843d048 Update user-agent and Scraper URL configs 2024-12-07 18:47:22 +05:30
mhdzumair 49cc1b60eb Remove obsolete spiders Streamed and StreamBTW 2024-12-07 18:37:35 +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 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
mhdzumair e4b47d2d3f Remove unnecessary index handling in live tv stream name 2024-11-17 21:44:21 +05:30
mhdzumair 168f0c6338 Add session id handling for streamed live sports 2024-11-14 08:03:10 +05:30
mhdzumair e1d013aca9 Use built-in CloseSpider for inactive spiders 2024-11-04 07:57:49 +05:30
mhdzumair 834132af19 Refactor torrent stream handling for series metadata
Removed unnecessary link fields in models and streamlined creation and organization of torrent streams in store pipelines. Updated the organize_episodes function to fetch streams directly from the database and async functionality for saving episodes back to their respective streams.
2024-11-01 16:41:35 +05:30
mhdzumair fde61f7dfd Remove ScrapeOps integration 2024-11-01 16:31:58 +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
mhdzumair a091b70b80 Fix inactivity monitor time condition 2024-10-16 21:24:21 +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 0e7a5126f5 Add centralized config management for spiders & Remove deprecated spiders and update related configurations (#299)
* Add centralized config management for spiders

* Remove deprecated spiders and update related configurations
2024-09-27 21:50:29 +05:30
Mohamed Zumair 709dc25d94 Enhance TV streaming functionality with MPD DRM support, and updated spiders & Bugfixes (#298)
* Refactor stream parsing and handling for DRM and MediaFlow

* Add encryption support for mediaflow url and refactor URL validation

* Enhance LiveTV spider to support MPD and handle new player API logic

* Update TV stream validation and add DRM fields in UI

* Add mediaflow_proxy_required.mp4 exception video

* Add FlareSolverr integration to scrapy spiders

* [WIP] TamilBulb spider to scraper

* Update StreamedSpider to new API and adjust schedulers
2024-09-27 08:13:10 +05:30
mhdzumair ecef54e961 update delays and backoff factor ratelimit 2024-09-18 13:46:05 +05:30
Mohamed Zumair 77042b2054 Fallback imdb metadata scraping via cinemeta & Scrapy Ratelimit middleware & metadata empty cache bugfixes (#290)
* Add ratelimit retry middleware for scrapy & bugfixes

* #289: bugfix metadata & catalog empty cache error

* Add support for fallback imdb metadata scraping through cinemeta API
2024-09-18 10:13:53 +05:30
Mohamed Zumair c8f660b7ee Add Support for download streams via web browser & support disabling the metadata for imdb title (#287)
* Add Support for download streams via web browser & support disabling the metadata for imdb title

* Add env config to enable or disable download via browser feature
2024-09-18 06:54:37 +05:30