r/PythonLearning • u/IllustratorUnfair330 • 19m ago
Beginner struggling with web scraping multiple Wikipedia pages using BeautifulSoup in Spyder
Hi everyone!
I'm fairly new to Python and currently learning web scraping using Spyder, BeautifulSoup, and requests.
I've been trying to write a script that extracts data from a Wikipedia table, collects the links from the table, and then visits each link to scrape the corresponding Wikipedia article.
I've managed to get some parts working, but I'm struggling to figure out whether my approach is correct and if there are any mistakes in my code.
I'm particularly unsure about how I'm extracting the links and downloading the individual pages.
I would really appreciate some guidance on how to troubleshoot this or improve my approach.
I'm not looking for someone to write the code for me, just some explanations or pointers so I can understand what I'm doing wrong.
Thanks in advance!

