annotate getdate.py @ 99:2bccbf473ff4

kemonopartydownloader.py: --cookies is an argument, not an option committer: GitHub <noreply@github.com>
author Paper <37962225+mrpapersonic@users.noreply.github.com>
date Sun, 14 Aug 2022 05:30:44 -0400
parents 1508aee998df
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
64
1508aee998df Add Windows 95 Keygen GUI
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
1 import json
1508aee998df Add Windows 95 Keygen GUI
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
2 import sys
1508aee998df Add Windows 95 Keygen GUI
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
3 import datetime
1508aee998df Add Windows 95 Keygen GUI
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
4
1508aee998df Add Windows 95 Keygen GUI
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
5 with open(sys.argv[1]) as f:
1508aee998df Add Windows 95 Keygen GUI
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
6 data = json.load(f)
1508aee998df Add Windows 95 Keygen GUI
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
7 print(data['fulltitle'] + " [{0}]".format(data["uploader"]), end="\n\n-----------------\n\n")
1508aee998df Add Windows 95 Keygen GUI
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
8 upload_date = datetime.datetime(int(data["upload_date"][:-4]), int(data["upload_date"][4:][:-2]), int(data["upload_date"][6:]))
1508aee998df Add Windows 95 Keygen GUI
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
9 print("Published on " + f"{upload_date.strftime('%b')} {upload_date.strftime('%d').strip('0')}, {upload_date.strftime('%Y')}", end="\n\n")
1508aee998df Add Windows 95 Keygen GUI
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
10 print(data["description"])