Skip to content

Commit b458f9f

Browse files
committed
Update httpx code to follow redirects
A breaking change from awhile ago with httpx.
1 parent 8691402 commit b458f9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/py/ch05_pypi/scrape.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def get_html(n: int) -> str:
1313
print(Fore.YELLOW + f"Getting HTML for episode {n}...", flush=True)
1414
url = f'https://talkpython.fm/{n}'
1515

16-
resp = httpx.get(url)
16+
resp = httpx.get(url, follow_redirects=True)
1717
resp.raise_for_status()
1818

1919
return resp.text

0 commit comments

Comments
 (0)