So I am working on a script for myself in python to download works from Ao3. I have this setup file
{
"username": "username",
"password": "password",
"downloadsPath": "~/Downloads/ao3",
"format": "epub"
}
my problem is with the download path variable. in my scrip I do the following:
def main():
setup = openJson(os.path.join(os.path.dirname(__file__), "setup.json"))
os.makedirs(setup["downloadsPath"], exist_ok=True)
to make sure the destination for downloads exists.
except that rather than creating the ao3 folder in /home/user/Downloads/
it creates a new ~/
folder in the CWD so something like /cwd/~/Downloads/ao3
I have no idea why it started doing this because before I started to do the rest of the script everything was fine but after a day of working on the script this behaviour started.