Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2e5b648

Browse files
Merge pull request #12 from shireenrao/patch-1
httpx does not follow redirects by default.
2 parents ce0a09a + d638cb5 commit 2e5b648

File tree

1 file changed

+1
-1
lines changed
  • ch04-language-foundations/async/async_scrape

1 file changed

+1
-1
lines changed

‎ch04-language-foundations/async/async_scrape/program.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ async def get_html(episode_number: int) -> str:
1616
url = f'https://talkpython.fm/{episode_number}'
1717

1818
async with httpx.AsyncClient() as client:
19-
resp = await client.get(url)
19+
resp = await client.get(url, follow_redirects=True)
2020
resp.raise_for_status()
2121

2222
return resp.text

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /