]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[README.md] Add uploader extraction sample in example extractor
authorSergey M. <dstftw@gmail.com>
Sun, 18 Oct 2015 19:12:41 +0000 (01:12 +0600)
committerSergey M. <dstftw@gmail.com>
Sun, 18 Oct 2015 19:12:41 +0000 (01:12 +0600)
README.md

index cf4aebf3dfc0be5ef8c725efa8250a5e65fc1ee9..a6ec9619cf175ba6777d5cbe61dada2c9e709d1d 100644 (file)
--- a/README.md
+++ b/README.md
@@ -710,12 +710,13 @@ If you want to add support for a new site, you can follow this quick list (assum
             webpage = self._download_webpage(url, video_id)
 
             # TODO more code goes here, for example ...
-            title = self._html_search_regex(r'<h1>(.*?)</h1>', webpage, 'title')
+            title = self._html_search_regex(r'<h1>(.+?)</h1>', webpage, 'title')
 
             return {
                 'id': video_id,
                 'title': title,
                 'description': self._og_search_description(webpage),
+                'uploader': self._search_regex(r'<div[^>]+id="uploader"[^>]*>([^<]+)<', webpage, 'uploader', fatal=False),
                 # TODO more properties (see youtube_dl/extractor/common.py)
             }
     ```