Commit Graph

228 Commits

Author SHA1 Message Date
mhdzumair 0ccd59e15c Fix series parse in torrent parsing 2024-12-17 22:48:34 +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 402c86b907 Add support for specifying total pages in tgx scraper tasks 2024-12-15 23:00:29 +05:30
mhdzumair 32b00d0302 Add YTS on-demand search scraper integration for movie torrent parsing
Introduced a new `YTSScraper` to fetch and process movie torrents from YTS. Updated configuration, runtime constants, and utilities to support the scraper. This enhancement extends scraping capabilities to include YTS as a source for movie streams.
2024-12-15 21:00:35 +05:30
mhdzumair 3b22ff1753 Fix language filtering 2024-12-15 19:08:48 +05:30
mhdzumair 3cf2a51b79 Fix imdb rating saving on poster creation 2024-12-15 11:17:38 +05:30
mhdzumair 47b164b60e Add support for "Unknown" filters in nudity and certification
This update introduces the "Unknown" option for nudity and certification filters, allowing more granular control over filtering logic. Adjustments were made to validation, database queries, and schemas to handle the new filter option seamlessly. The frontend configuration UI is also updated to reflect the changes.
2024-12-15 11:16:01 +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 c477816fbf convert imdb scraping fully in async 2024-12-14 18:01:14 +05:30
mhdzumair 98085b7c06 Add support for request proxy with httpx & aiohttp libs
Replaced custom proxy implementation and `curl-cffi` with unified `httpx` and `aiohttp` proxy support using `requests_proxy_url` config from settings. Simplified and standardized HTTP client instantiations across various modules for improved maintainability and consistency.
2024-12-13 15:55:10 +05:30
mhdzumair 49cc1b60eb Remove obsolete spiders Streamed and StreamBTW 2024-12-07 18:37:35 +05:30
mhdzumair bc195e81f6 Add capacity limiter to async demagnetization 2024-12-07 17:51:39 +05:30
Munif Tanjim d8ae426a9a StremThru Improvements (#385)
* Improve StremThru error handling

* Allow access to http response object

* Add configure time StremThru store name validation

* Store StremThru magnet cache in redis

* Add settings toggle for storing StremThru magnet cache

* Update streaming_providers/debrid_client.py

* Support using public StremThru instance

---------

Co-authored-by: Mohamed Zumair <mhdzumair@gmail.com>
2024-12-07 10:36:31 +05:30
mhdzumair 0e633d31d8 Remove caching for contribution user & Add support for parsing torrent seasons, episodes from files & fix language selection on upload contribution streams 2024-12-02 22:30:44 +05:30
mhdzumair e0e5855444 fmt 2024-11-30 07:00:25 +05:30
mhdzumair bae7225655 Refactor caching to simplify streaming provider handling & only use the users downloaded list for unsupported stremthru store names 2024-11-30 06:58:43 +05:30
Munif Tanjim b52a7fdf7e Read redis debrid cache for StremThru (#383) 2024-11-30 06:41:31 +05:30
mhdzumair 29f4bd11aa Improve stream sorting with direction toggle feature
Enhanced the stream sorting functionality to support sorting direction (ascending or descending) based on user preferences in both the backend and UI. Introduced 'SortingOption' in the schema to capture sorting criteria with direction, and updated the sorting logic to accommodate these changes. Additionally, modified the user interface to include buttons for toggling sort directions, providing a more intuitive sorting experience for users.
2024-11-29 23:08:15 +05:30
mhdzumair 7619c12d14 Handle decryption errors and log failures. 2024-11-29 07:46:23 +05:30
mhdzumair e23a7f0474 Remove EasyDebrid shady debrid service 2024-11-29 06:04:04 +05:30
mhdzumair 294370cf6b #379: Add Swedish to filter 2024-11-28 23:00:57 +05:30
mhdzumair eaf1fbdd96 Add support for disabling streaming providers and error handling
Introduce a system for toggling streaming providers, allowing specific providers to be disabled via configuration. Enhance error handling in user data decryption by adding validation checks and returning precise error messages in JSON responses. These changes improve flexibility for administrators and provide better feedback to users.
2024-11-28 18:44:52 +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 8dbac1c3ac Added support for maintaining caching status for each debrid service redis with expiry 2024-11-27 23:31:08 +05:30
mhdzumair da4de1423b Remove redundant disable_download_via_browser env configuration option 2024-11-27 08:32:07 +05:30
ragmehos b8590ecf5a Added support for scrape from Mediafusion instance (#358) 2024-11-27 08:13:44 +05:30
ragmehos 985b4cdfbf Added Easydebrid support (#378) 2024-11-27 05:58:00 +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
mhdzumair b73eb430c3 Fix stremthru issues 2024-11-20 08:07:37 +05:30
Munif Tanjim 73c9bf237a Add StremThru as streaming provider (#345)
* Add StremThru as streaming provider

* Refactoring on Stremthru

---------

Co-authored-by: mhdzumair <mhdzumair@gmail.com>
2024-11-19 14:44:01 +05:30
mhdzumair 904aebd6d3 Revise is_video_file function to support more formats
Expanded the list of supported video file extensions in the `is_video_file` function to include modern streaming formats, high-efficiency containers, and legacy formats. Added docstring to provide a clear explanation of the function's purpose and usage.
2024-11-14 23:34:24 +05:30
Mohamed Zumair 467f378207 Add Configuration validations & loading widget for responsiveness (#342) 2024-11-02 19:56:02 +05:30
Mohamed Zumair 05fbafe8e6 Add configuration mode & Refactor stream filtering and catalog configuration (#340)
* Add configuration mode switch for user customization

Introduce a 'Configuration Mode' switch to toggle between 'Newbie' and 'Pro' modes, allowing users to select between simplified and advanced configurations. Updated CSS and JS to handle the display of specific settings and sections based on the selected mode, enhancing user experience and customization options.

* Update default language filters and sorting priority.

* Refactor stream filtering and catalog configuration.

Removed redundant catalog selection logic and refactored stream filtering to streamline the code. Updated configuration scripts and UI to align with new functionality, leading to cleaner and more maintainable code.
2024-11-01 23:00:41 +05:30
mhdzumair 9f07a7bb6f Refactor metadata handling and update torrent catalogs 2024-11-01 16:43:48 +05:30
mhdzumair 1057b51e22 Fix file path decoding in torrent utility 2024-11-01 16:22:27 +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 9ebf4b8092 Generate manifest.json using Jinja template for cleanest & 2.5x faster (#329) 2024-10-19 22:44:34 +05:30
mhdzumair ab802cebf8 Avoid modifying streams with filter values & remove storing cached key in db 2024-10-16 16:29:44 +05:30
mhdzumair 5f7d809419 Fix dynamic sorting created_at time issue with compare offset-naive and offset-aware datetimes 2024-10-16 15:20:32 +05:30
mhdzumair 39963b6e44 Fix missing events streams on non catalog config 2024-10-16 14:49:24 +05:30
mhdzumair 88521d9dd7 Fix mediaflow name typo 2024-10-16 14:48:19 +05:30
mhdzumair 2b40970032 Fix MediaFlow proxy url var typo 2024-10-16 03:52:19 +05:30
Mohamed Zumair ecaf7e5cf1 Added filter for only show cached stream, Redis lock for prevent concurrent live scrape, bug fixes & improvements (#325)
* cleanup lifespan vars

* Show API process time in logs

* store the cache validation of full URL for live sports event

* Add support for filter only show cached streams

* Update default configs

* properly handle prowlarr exception on MaxProcessLimitReached

* Add redis lock mechanism to prevent concurrent live scrapers from multiple instances of stremio addon installation users
2024-10-15 18:43:03 +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
mhdzumair 515b58fe1d Fix dynamic torrent sorting 2024-09-29 10:24:55 +05:30
Mohamed Zumair db7fab8b40 Prepare Release, Update docs with new features & Bug fixes (#303)
* Refactor Kodi addon setup to input code after expire

* Use `parse.urljoin` for URL construction

* Add error handling for cache setup and request response

* Fix WebDAV auth configuration and enhance README setup guide

* Update color values for Kodi Setup visibility

* Refactor kodi request cache

* Update README and home page with new features
2024-09-28 19:45:16 +05:30
Mohamed Zumair fb6237ef16 Refactor Zilean scraper for v2 changes & Add support RD private token & Enhance Error Handling
* Fix error handling and add specific exceptions

* Add support for private tokens in RealDebrid client

* UI: Enhance Kodi setup modal with a guide link

* Refactor Zilean scraper for v2 changes & improved error handling

* Handle Binascii error in RealDebrid client token decoding
2024-09-28 08:14: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