data_science
data_science copied to clipboard
Url is updating every loop
Hi Otavio.
First off, you have created really intutive code to scrape medium. Theres only a small issue, in line 26 you have
url = f'{url}/archive/{year}/{month}/{day}'
, so the url updates every cycle.
For example if url = https://medium, then in the second intteration of the loop,
'url = https://medium/archive/{year}/{month}/{day}/archive/{year}/{month}/{day}'. You likely aren't updating this anymore, but if you are, its a quick fix!