#π web scraping from wikipedia
28 messages Β· Page 1 of 1 (latest)
@silver iron
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
I've done something similar
https://gitlab.com/offby1/smallest-enclosing-circle/blob/main/scrape_MTA_stations.py#L28
The gist is: search for the table you want
ill look at this appreciate the help bro!
what does that mean exactly
well, "pandas" is a library, just like "requests" or "beautifulsoup"
"read_html" is one of the functions that it provides
I'm using that function
works for me!
somehow, TIL this existed
i think i've manually parsed at least one HTML table in my age π₯΄
I will bet you you wind up with something similar, since I imagine all the tables in wikipedia follow the same structure
why are u scraping wikipedia btw? they have a free rest api for use
I am pretty sure I tried doing it by hand myself before I stumbled onto this
I tried the API for my thing, and it wasn't useful
can't remember the details
im new to programming so this was just the way i thought i could do it
ah alright
learning cool π
Somehow, TIL this existed
(or else I tried it and gave up on it long ago and then forgot about it)
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.