Skip to content

Commit

Permalink
Increase timeout on invidious plugin. Allow redirections on paginated…
Browse files Browse the repository at this point in the history
… requests in ivoox.
  • Loading branch information
dyeray committed Oct 20, 2023
1 parent 3b6229e commit 5c4c55c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/invidious.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(self, options: dict[str, str]):
super().__init__({'domain': os.getenv('INVIDIOUS_DOMAIN'), **options})

def get_feed(self, feed_id):
response = httpx.get(f"https://{self.options.domain}/feed/{self.options.feed_type}/{feed_id}")
response = httpx.get(f"https://{self.options.domain}/feed/{self.options.feed_type}/{feed_id}", timeout=10)
sel = Selector(response.text)
title = sel.css('feed > title::text').get()
return PodcastFeed(
Expand Down
2 changes: 1 addition & 1 deletion plugins/ivoox.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def get_feed(self, feed_id):
next_page_url = sel.css('.pagination li:last-child a::attr(href)').get()
if next_page_url == '#':
break
response = httpx.get(next_page_url)
response = httpx.get(next_page_url, follow_redirects=True)
sel = Selector(response.text)
videos.extend(sel.css('.modulo-type-episodio'))
return PodcastFeed(
Expand Down

0 comments on commit 5c4c55c

Please sign in to comment.