Skip to content

Commit

Permalink
Fixed podnapisi TypeError since we've merged #2790.
Browse files Browse the repository at this point in the history
  • Loading branch information
morpheus65535 committed Jan 18, 2025
1 parent 214b815 commit 6fc6ca5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions custom_libs/subliminal_patch/providers/podnapisi.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,12 @@ def query(self, language, keyword, video, season=None, episode=None, year=None,
# query the server
content = None
try:
content = self.session.get(self.server_url + 'search/old', params=params, timeout=30).content
xml = etree.fromstring(content)
content = self.session.get(self.server_url + 'search/old', params=params, timeout=30)
xml = etree.fromstring(content.content)
except etree.ParseError:
if '429 Too Many Requests' in content:
if '429 Too Many Requests' in content.text:
raise TooManyRequests
logger.error("Wrong data returned: %r", content)
logger.error("Wrong data returned: %r", content.text)
break

# exit if no results
Expand Down

0 comments on commit 6fc6ca5

Please sign in to comment.