1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2025-08-20 08:14:42 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Evgenii
0daf4e901b
Merge 3462456666144a08ef16ae02390c4a5b6512a8f2 into 3eb8d22ddb8982ca4fb56bb7a8d6517538bf14c6 2025-04-01 08:03:01 +02:00
eukub
3462456666 change regular expression 2023-12-13 21:01:17 +03:00

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)