Calion

BUG download csv theme

Recommended Posts

Hi,

I download a file from 'https://cdn.rebrickable.com/media/downloads/themes.csv.gz' to get themes but there is a missing theme with the latest version (https://cdn.rebrickable.com/media/downloads/themes.csv.gz?1578753252.0287247). The missing theme is { id: 687,  name: 'Frozen II' }. In fact, It can be fine but if I retrieve the set list from this url (https://cdn.rebrickable.com/media/downloads/sets.csv.gz) The theme appears in the set 30553-1. I got an error because the theme is missing.

how can I get easily the latest file because I don't know how can I get the identifier of the version like this '1578753252.0287247' ?

Thanks,

themes (1).csv themes (2).csv

Share this post


Link to post
Share on other sites

I've just downloaded the file (update 2020-02-11 2:34 pm, and the theme is there. If you download the link listed on the download-page, you always get the latest version. Direct links like the first one in your post apparently get an older version. Are you manually downloading them? Or are you using a script of some sorts? I have a Python script that gets me the most recent files.

themes.csv

Share this post


Link to post
Share on other sites

Hi,

 

Thanks to answer quickly. Yes, I have a script which download each files and I need to put the latest url. I was thinking if there is not identifier in the url. I got the latest version but no. Is it possible to get the url easily and automatically ?

 

Thanks,

Share this post


Link to post
Share on other sites
42 minutes ago, Calion said:

Hi,

 

Thanks to answer quickly. Yes, I have a script which download each files and I need to put the latest url. I was thinking if there is not identifier in the url. I got the latest version but no. Is it possible to get the url easily and automatically ?

 

Thanks,

This script looks at the source code of the download page, so you don't have to know the identifier. Credits for the script goes to @legolijntje. I've added a part that unzips the files, I've put that behind #, in case you don't want to use it.


rebrickable_downloads.py

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now