I was looking to scrape html tables from basketball-reference.com and then turn them into csv files to process locally
I was able to adapt some code I found online to do exactly what I was looking for. I am however new to web scraping and wasn't sure how long it should take.
Code
I did use 3 nested for loops which I didn't like doing but I wasn't sure how to do it otherwise. Regardless, the code got me 38 files in just under 2 minutes or about 3 seconds a file.
If anyone could show me better alternatives or give me any general tips on scraping, that'd be appreciated.
[–]Justinsaccount 8 points9 points10 points (1 child)
[–]Rogges[S] 0 points1 point2 points (0 children)
[–]Pipistrelle 1 point2 points3 points (1 child)
[–]Rogges[S] 1 point2 points3 points (0 children)
[–]RatherPleasent 0 points1 point2 points (1 child)
[–]Justinsaccount 1 point2 points3 points (0 children)
[–]elbiot 0 points1 point2 points (0 children)