A bot that downloads all your photos and videos from Snapchat.
This bot was created to solve an issue my sister had with downloading her memories from Snapchat. She wanted to save the photos and videos all locally and Snapchat has a web portal where they let you download all your past photos and videos. However, this was done in a zip file within which there was an html file with links to each individual file to be downloaded. No mass download button or option to download everything. So instead of spending days downloading thousands of files, I made a web scraping bot that takes that html file and downloads each file for you. However, as it turns out, for some reason there were also duplicates in that html file and so I also made an extra script to remove the duplicate files and mass download all the unique pictures and videos. This doesn't analyse the files in anyway to see if they are similar, it just checks 1:1 if they are exactly the same so you don't have to worry about missing files. My sister got everything she wanted and it ran for at least 2-3 days straight so I thought I'd share this to prevent anyone else in that situation from forcing themselves to go through the agony of manually downloading everything and then giving up halfway.
To use it, run data.py first to generate a list of all the dates in the form of date_store.pkl. Make sure you have dirname set to your destination directory for everything to be donwloaded and the path in drive.get() set to the location of your html file for all scripts. You can then run snapbot.py and finally if you want to remove duplicate files, dedupe.py when it's done.