Compare commits
No commits in common. "3c522c64599fa56568e8edb1716ace7e3c4b1194" and "4084f836cc0a378a64f71fb426b32ed9f8b94037" have entirely different histories.
3c522c6459
...
4084f836cc
@ -67,14 +67,16 @@ ydl_opts = {
|
||||
'outtmpl': '{}/%(uploader)s-%(title)s-%(id)s.%(ext)s'.format(playlistDir)
|
||||
}
|
||||
for v in filteredVideos:
|
||||
print(getYear(v), getId(v))
|
||||
videoURL = 'https://www.youtube.com/watch?v='+getId(v)
|
||||
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
|
||||
ydl.download([videoURL])
|
||||
|
||||
# Save metadata to file
|
||||
descriptionFile = '{}/{}-{}-{}.txt'.format(playlistDir,
|
||||
getChannel(v),
|
||||
getTitle(v).replace('/', ''),
|
||||
getId(v))
|
||||
if not os.path.exists(descriptionFile):
|
||||
description = open(descriptionFile, 'w')
|
||||
# Save metadata to file
|
||||
description = open('{}/{}-{}-{}.txt'.format(playlistDir,
|
||||
getChannel(v),
|
||||
getTitle(v),
|
||||
getId(v)), 'w')
|
||||
description.write('Title: ' + getTitle(v) + '\n')
|
||||
description.write('Uploaded: ' + getUploadTime(v) + '\n')
|
||||
description.write('Channel: ' + getChannel(v) + '\n')
|
||||
@ -83,8 +85,3 @@ for v in filteredVideos:
|
||||
description.write('Tags: ' + getTags(v) + '\n')
|
||||
description.write('Video ID: ' + getId(v) + '\n')
|
||||
description.close()
|
||||
|
||||
videoURL = 'https://www.youtube.com/watch?v='+getId(v)
|
||||
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
|
||||
ydl.download([videoURL])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user