1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-03 08:35:32 +00:00

[cleanup] Misc

Closes #5897
This commit is contained in:
pukkandan
2023-02-17 17:52:22 +05:30
parent 30031be974
commit a538772969
26 changed files with 84 additions and 47 deletions

View File

@ -1,7 +1,7 @@
import re
from .common import PostProcessor
from ..utils import Namespace, filter_dict
from ..utils import Namespace, filter_dict, function_with_repr
class MetadataParserPP(PostProcessor):
@ -60,6 +60,7 @@ class MetadataParserPP(PostProcessor):
f(info)
return [], info
@function_with_repr
def interpretter(self, inp, out):
def f(info):
data_to_parse = self._downloader.evaluate_outtmpl(template, info)
@ -76,6 +77,7 @@ class MetadataParserPP(PostProcessor):
out_re = re.compile(self.format_to_regex(out))
return f
@function_with_repr
def replacer(self, field, search, replace):
def f(info):
val = info.get(field)