Skip to content

Commit

Permalink
Fix flaresolverr support
Browse files Browse the repository at this point in the history
  • Loading branch information
Elehiggle committed Dec 20, 2024
1 parent fca3427 commit f2371f3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion chatbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,9 @@ def request_link_content(link):
with httpx.Client() as client:
# By doing the redirect itself, we might already allow a local request?
with client.stream("GET", link, timeout=4, follow_redirects=True) as response:
response.raise_for_status()
# Raise for bad status codes if we don't have a FlareSolverr endpoint, this can cause issues though if the requested content is not text
if not flaresolverr_endpoint:
response.raise_for_status()

final_url = str(response.url)

Expand Down

0 comments on commit f2371f3

Please sign in to comment.