Strip date from video title

This commit is contained in:
blank X 2021-04-07 16:22:38 +07:00
parent c23d2fc52e
commit b980e90068
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
1 changed files with 1 additions and 0 deletions

View File

@ -147,6 +147,7 @@ async def _video_worker():
text = 'New video'
if is_late:
text += ' (is late)'
video_json['title'] = strip_date.sub('', video_json['title']).strip()
text += f': {video_json["title"]}\nhttps://youtube.com/watch?v={video_json["id"]}'
with BytesIO(json.dumps(video_json, indent=4).encode()) as file:
file.name = video_json['id'] + '.json'