Jellofishi Posted September 14, 2019 Posted September 14, 2019 (edited) Recently decided to recycle all the paper that the lego instructions I have came on. Wanted to download all the digital instructions for the sets I have from the lego site. Me being lazy and a software developer (and having accumulated quite a bit of LEGO recently) I went the code path. This python script will read set numbers from a text file (sets.txt, newline separated) and download the relevant instructions into a folder per set number, with the instruction description as the filename (as opposed to the random number supplied by the download link) This is an assistant script and should not be used to simple mirror all the instructions on the LEGO site just for giggles. There is an intentional 2 second wait between downloads as to not hammer the website. Supports downloading manuals from: * Official LEGO site (https://www.lego.com/en-us/service/buildinginstructions) - lego_download.py * Let's build it again (https://letsbuilditagain.com/index.php) - lego_lets_build_it_again.py * http://bricks.argz.com - lego_briks_argz.py Written and tested using python 3 on osx. Again: please do not abuse these scripts. Enjoy. https://github.com/Jellofishi/lego_instructions Edited September 14, 2019 by Jellofishi updated link to git repository Quote
Rustinidiel Posted September 14, 2019 Posted September 14, 2019 (edited) sorry, i not tryed your method... and ot understand why... when Lego provides itself a method to download all instructions... https://www.lego.com/en-us/service/buildinginstructions Edited September 14, 2019 by Rustinidiel Quote
SylvainLS Posted September 14, 2019 Posted September 14, 2019 28 minutes ago, Rustinidiel said: sorry, i not tryed your method... and ot understand why... when Lego provides itself a method to download all instructions... https://www.lego.com/en-us/service/buildinginstructions On this page, you have to enter each and everyone of the sets you want, then wait, then click, then save where you want them, under a legible name. With Jellofishi’s script, you just put the sets’ numbers in a file, launch the script, and everything is downloaded and sorted for you. Quote
Rustinidiel Posted September 14, 2019 Posted September 14, 2019 the difference is 2 click than 4? Quote
Jellofishi Posted September 14, 2019 Author Posted September 14, 2019 (edited) 3 hours ago, Rustinidiel said: sorry, i not tryed your method... and ot understand why That's ok. 29 minutes ago, Rustinidiel said: the difference is 2 click than 4? No. the difference is no clicks (because it's all keyboard). but other than that: * creating the folders. * naming the downloaded files correctly (because the lego side does not name them a meaningful name) and navigating to the correct folder each time. * clicking each file when there may be 2-10 pdfs in each search result. * finding the correct search result if there are multiple results for the set number because it may be 4 number and there are 5 number results * do this for around 50 sets. took me less time and was more interesting writing the script. I abhor repetitive manual labour :) when Lego provides itself a method to download all instructions... Each with the method they prefer. p.s. Bonus points for the LEGO site having a JSON api on that search page. Edited September 14, 2019 by Jellofishi Quote
Rustinidiel Posted September 14, 2019 Posted September 14, 2019 (edited) 2 hours ago, Jellofishi said: That's ok. No. the difference is no clicks (because it's all keyboard). but other than that: * creating the folders. * naming the downloaded files correctly (because the lego side does not name them a meaningful name) and navigating to the correct folder each time. * clicking each file when there may be 2-10 pdfs in each search result. * finding the correct search result if there are multiple results for the set number because it may be 4 number and there are 5 number results * do this for around 50 sets. took me less time and was more interesting writing the script. I abhor repetitive manual labour :) Each with the method they prefer. p.s. Bonus points for the LEGO site having a JSON api on that search page. if you prefer that method... i'm not saying it is nosense... but i not see that complicated the procedure on Lego site as you said... the pdf have as a meaningful name, the number of the set.. i'm registered and when search an instruction, automatically the site select the pdf wirth the right region version... really, for me the official method is very simple and fast... i not see the interesting thing you said... but, well, if you enjoy it, good Edited September 14, 2019 by Rustinidiel Quote
Jellofishi Posted September 14, 2019 Author Posted September 14, 2019 1 hour ago, Rustinidiel said: the pdf have as a meaningful name, the number of the set.. could you send me an example link to that ? I'm using https://www.lego.com/en-us/service/buildinginstructions and that's not what I'm getting. Quote
Rustinidiel Posted September 15, 2019 Posted September 15, 2019 4 hours ago, Jellofishi said: could you send me an example link to that ? I'm using https://www.lego.com/en-us/service/buildinginstructions and that's not what I'm getting. my fault... i've controlled right now... and you are in right: the pdf downloaded from the Lego service have weird names of the file... i remembered wrong because when i search an instruction, i copy the set number... Ctrl+V on the Lego service search bar, and Ctrl+V when save the file... anyway it not takes time to being done... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.