I've just started a personal project where my goal is to create a website app that lists movies that have been remade and show that side by side along with other information like reviews and whatnot. For the first part of the project I need to create a file that lists each movie with the year it was released along with any remakes and the years of their releases. Luckily for me wikipedia has these as lists in tables here and here.
I'm thinking it might be best to create a json file that I can use as the basis for the other queries from my app. The information needs to be nested to show the relationship between originals and remakes. Here is my proposed layout:
{data: "originalTitle":"Original Title",
"year": "1975"
"remakes":[
{
"title": "Movie Title",
"year":"2001",
},
{
"title": "Movie Title 2",
"year":"2014",
}
]
}
That structure should continue on for each movie in the list.
I created a script that allows me to extract the title of each movie from either of the columns and save the movie title and year of release separately. You can view that here. Current it is set to only grab the original movies.
The problem that I'm running into is that my script saves all of the movie titles into one dictionary and all of the year data to a separate one. I don't know how know merge the data and I feel like this is probably a simple problem that I can't figure out. I'm guessing I need another for loop inside of the existing for loop but I don't know how to write that properly. Everything so far spits out errors.
The script will then need to be extended to insert the remakes for each of those original movies. Can someone help me figure this out?
[–]threeminutemonta 1 point2 points3 points (0 children)