As the example used by Prateek Bhaiya is been updated on Wikipedia’s page. So it is very difficult to extract the data properly in the manner in which he elaborated. Please tell me the solution about how to resolve it.
Data Acquisition using Web Scraping
Request you to specify which part are you facing problem in (Better if you could just share your code).
I went through the Wikipedia page and the table is still there. So, the code won’t require much changes to be compatible with the new page.
Happy Learning!
A quick fix for your problem would be to use an older version of the Wikipedia page. I’m attaching the link for a older page compatible with the video here.
But the recommended way would be to modify the code to accommodate the new changes which is quite easy:
I’ll explain the thing you need to consider:
Notice how the first row is now made up of two merged rows. This is problematic but can be easily resolved by discarding the second row from the results.
Other things don’t require any drastic change.
Hope this helps!
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.