mCodingLLC / VideosSampleCode

Code from the mCoding sample videos
MIT License
952 stars 198 forks source link

Follow HTTP 301 redirects #14

Closed raoulcapello closed 2 years ago

raoulcapello commented 2 years ago

Hi James,

First of all I really enjoy your channel and explanations - thanks for sharing!

I was playing around with the async example, and didn't get the expected results - some troubleshooting showed that in my case, httpx was receiving mostly HTTP 301 redirects - leading to empty pages being parsed and links being incorrectly counted.

Turns out that's easily fixed by adding a statement in the line of code in this pull request.

FYI, I also pointed this out on your Youtube channel (I'm CritiKaster):

https://www.youtube.com/watch?v=m_a0fN48Alw

Kind regards,

Raoul

mCodingLLC commented 2 years ago

Nice catch, I always forget because the default for requests is to follow redirects.