1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2025-06-22 11:26:20 +00:00

Merge 3462456666144a08ef16ae02390c4a5b6512a8f2 into c052a16f72af7dd7671d4dd62826de71cd99dfb6

This commit is contained in:
Evgenii 2025-04-14 08:50:22 +00:00 committed by GitHub
commit d86df8676e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,7 +19,7 @@ from youtube_dl import compat_str
year = compat_str(datetime.datetime.now().year)
for fn in glob.glob('*.html*'):
content = read_file(fn)
newc = re.sub(r'(?P<copyright>Copyright © 2011-)(?P<year>[0-9]{4})', 'Copyright © 2011-' + year, content)
newc = re.sub(r'(?P<copyright>Copyright © 2011-)(?P<year>\d{4})', 'Copyright © 2011-' + year, content)
if content != newc:
tmpFn = fn + '.part'
write_file(tmpFn, newc)