This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""This is a basic script I mashed together to download all the media on a users profile. | |
Nothing else I found seemed to work well, so I added support for all the media types I came across. | |
The code isn't particularly clean or optimised, it just gets the job done. | |
Usage: | |
UserDownloader(username).download() | |
It will download to `current_dir/username/filename.ext`. | |
An SQLite database saved in the same folder is used to ignore duplicate urls and file hashes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import json | |
# Open the JSON file and read its contents | |
print('Loading data...') | |
with open('Records.json') as json_file: | |
data = json.load(json_file) | |
# Create a CSV file and write the headers | |
print('Processing data...') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
import win32crypt # Requires pywin32 package | |
WORKBENCH_REGEX = re.compile( | |
'(?P<dbm>[A-z]+)' | |
'@' | |
'(?P<host>[A-z0-9._-]+)' | |
':' |
OlderNewer