comparison channeldownloader.py @ 58:edbe4aff3b78

Update channeldownloader.py why did i even do that committer: GitHub <noreply@github.com>
author Paper <37962225+mrpapersonic@users.noreply.github.com>
date Wed, 13 Oct 2021 18:45:50 -0400
parents 00403c09455c
children a3927b2ec6e6
comparison
equal deleted inserted replaced
57:861f4a9992ae 58:edbe4aff3b78
179 print(" video not available on the Wayback Machine!") 179 print(" video not available on the Wayback Machine!")
180 except Exception as e: 180 except Exception as e:
181 print(" unknown error downloading video!") 181 print(" unknown error downloading video!")
182 print(e) 182 print(e)
183 # metadata 183 # metadata
184 meta = {
185 "fulltitle": i["title"],
186 "description": i["description"],
187 "upload_date": i["upload_date"],
188 "uploader": i["uploader"]
189 }
190 metajson = json.dumps(meta)
191 with open("{2}\\{0}-{1}.info.json".format(sanitize_filename(i["title"], restricted=True), i["id"], output), "w") as jsonfile: 184 with open("{2}\\{0}-{1}.info.json".format(sanitize_filename(i["title"], restricted=True), i["id"], output), "w") as jsonfile:
192 print(metajson, end="", file=jsonfile) 185 print(json.dumps(i), end="", file=jsonfile)
193 print(" saved {0}-{1}.info.json".format(sanitize_filename(i["title"], restricted=True), i["id"], output)) 186 print(" saved {0}-{1}.info.json".format(sanitize_filename(i["title"], restricted=True), i["id"], output))