X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fpostprocessor%2Fmetadatafromtitle.py;h=42377fa0f0bde0d3fa6ae578c6eaa0fe4a73474d;hb=611c1dd96efc36a788475e14cc4de64d554d28a0;hp=4c9d3aafec43ec12be9dcb4eba991274d8dbe849;hpb=e7db87f7000143341505cff812d1fa0371ac901e;p=youtube-dl diff --git a/youtube_dl/postprocessor/metadatafromtitle.py b/youtube_dl/postprocessor/metadatafromtitle.py index 4c9d3aafe..42377fa0f 100644 --- a/youtube_dl/postprocessor/metadatafromtitle.py +++ b/youtube_dl/postprocessor/metadatafromtitle.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +from __future__ import unicode_literals import re @@ -12,20 +12,19 @@ class MetadataFromTitlePPError(PostProcessingError): class MetadataFromTitlePP(PostProcessor): def __init__(self, downloader, titleformat): + super(MetadataFromTitlePP, self).__init__(downloader) self._titleformat = titleformat - self._titleregex = self.fmtToRegex(titleformat) + self._titleregex = self.format_to_regex(titleformat) - def fmtToRegex(self, fmt): + def format_to_regex(self, fmt): """ Converts a string like '%(title)s - %(artist)s' to a regex like '(?P