Skip to content

Commit

Permalink
fix: jackett again - my bad (#860)
Browse files Browse the repository at this point in the history
  • Loading branch information
iPromKnight authored Nov 5, 2024
1 parent ed5fb2c commit 703ad33
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/program/services/scrapers/jackett.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
from program.media.item import Episode, MediaItem, Movie, Season, Show
from program.services.scrapers.shared import ScraperRequestHandler
from program.settings.manager import settings_manager
from program.utils.request import create_service_session, get_rate_limit_params, RateLimitExceeded, HttpMethod
from program.utils.request import create_service_session, get_rate_limit_params, RateLimitExceeded, HttpMethod, \
ResponseType


class JackettIndexer(BaseModel):
Expand Down Expand Up @@ -245,7 +246,7 @@ def _fetch_results(self, url: str, params: Dict[str, str], indexer_title: str, s
"""Fetch results from the given indexer"""
try:
response = self.request_handler.execute(HttpMethod.GET, url, params=params, timeout=self.settings.timeout)
return self._parse_xml(response.data)
return self._parse_xml(response.response.text)
except RateLimitExceeded:
logger.warning(f"Rate limit exceeded while fetching results for {search_type}: {indexer_title}")
return []
Expand Down

0 comments on commit 703ad33

Please sign in to comment.