add filename
This commit is contained in:
parent
738eae5bdb
commit
c092abfa5d
1 changed files with 5 additions and 4 deletions
|
@ -121,12 +121,13 @@ class GetPeertubeVideos:
|
|||
self.downloaded_items.append(item['id'])
|
||||
self._write_downloaded_items()
|
||||
elif 'video' in selected['type']:
|
||||
self._log.info(
|
||||
"Downloading video '%s'...",
|
||||
selected['url']
|
||||
)
|
||||
file_extension = selected['type'].replace('video/', '.')
|
||||
file_name = os.path.join(self.config['download_dir'], item['title'], file_extension)
|
||||
self._log.info(
|
||||
"Downloading video '%s' as '%s'...",
|
||||
selected['url'],
|
||||
file_name
|
||||
)
|
||||
result = self.session.get(selected['url'])
|
||||
video_bytes = result.content
|
||||
with open(file_name, mode='wb') as video_file:
|
||||
|
|
Loading…
Reference in a new issue