diff options
| author | Sergey M․ <dstftw@gmail.com> | 2015-07-29 03:43:55 +0600 | 
|---|---|---|
| committer | Sergey M․ <dstftw@gmail.com> | 2015-07-29 03:43:55 +0600 | 
| commit | 23e7f53bd3c75ead7d2e474adff9df47b5e1c34a (patch) | |
| tree | d801ec84d217b86fcac647bb878b5dede6d6a531 /youtube_dl/extractor/common.py | |
| parent | 5d8df28d2728299d5550355f929e1282c0301464 (diff) | |
| parent | 000b6b5ae5cc214906effe4ac5b78b579bc7db70 (diff) | |
Merge branch 'purdeaandrei-save_tags_simpler_only_saves_tags_to_info_json'
Diffstat (limited to 'youtube_dl/extractor/common.py')
| -rw-r--r-- | youtube_dl/extractor/common.py | 11 | 
1 files changed, 8 insertions, 3 deletions
| diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index 14b9b4fe2..d54866d1f 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -181,6 +181,7 @@ class InfoExtractor(object):                      by YoutubeDL if it's missing)      categories:     A list of categories that the video falls in, for example                      ["Sports", "Berlin"] +    tags:           A list of tags assigned to the video, e.g. ["sweden", "pop music"]      is_live:        True, False, or None (=unknown). Whether this video is a                      live stream that goes on instead of a fixed-length video.      start_time:     Time in seconds where the reproduction should start, as @@ -630,6 +631,12 @@ class InfoExtractor(object):              template % (content_re, property_re),          ] +    @staticmethod +    def _meta_regex(prop): +        return r'''(?isx)<meta +                    (?=[^>]+(?:itemprop|name|property)=(["\']?)%s\1) +                    [^>]+?content=(["\'])(?P<content>.*?)\2''' % re.escape(prop) +      def _og_search_property(self, prop, html, name=None, **kargs):          if name is None:              name = 'OpenGraph %s' % prop @@ -660,9 +667,7 @@ class InfoExtractor(object):          if display_name is None:              display_name = name          return self._html_search_regex( -            r'''(?isx)<meta -                    (?=[^>]+(?:itemprop|name|property)=(["\']?)%s\1) -                    [^>]+?content=(["\'])(?P<content>.*?)\2''' % re.escape(name), +            self._meta_regex(name),              html, display_name, fatal=fatal, group='content', **kwargs)      def _dc_search_uploader(self, html): | 
