Can’t scrape the fields of different accelerators from a webpage
I’m trying to scrape a few fields of each accelerator out of 300 accelerators from a webpage. I can scrape the fields from the first accelerator, but I fail to grab fields from the rest of the accelerators since there are no uniform containers that I can make use of.
How to scrape the accurate fields from HTML tables of varying lengths?
I’m trying to create a script to scrape a few fields from tables based on their headers. The problem is that all the tables are not of the same length, along with their headers.
Can’t modify the logic of a script to scrape the accurate fields from tables of varying lengths
I’m trying to create a script to scrape a few fields from tables based on their headers. The problem is that all the tables are not of the same length, along with their headers. Here are the HTML elements of the two tables with different lengths for your consideration.
Data scraping with Python BrickEconomy website
I am scraping data from the website “https://www.brickeconomy.com/sets/year/2024” using the code I wrote. I managed to extract the names of the Lego sets from the table, but I cannot access the remaining data such as “Year”, “Theme / Subtheme”, “Pieces / Minifigs”, “Availability”, “Retail”, and “Value”. I want to access the data in each item in detail and save it in JSON format. If possible, I would also like to include the image link of the Lego set. Below is an example of my code.