add other properties; remove print verbose
authorsprhawk <465558+sprhawk@users.noreply.github.com>
Mon, 11 Dec 2017 08:02:14 +0000 (16:02 +0800)
committersprhawk <465558+sprhawk@users.noreply.github.com>
Mon, 11 Dec 2017 08:02:14 +0000 (16:02 +0800)
youtube_dl/extractor/weibo.py

index 9b398e9313de8a1b69efb2ac00f28d32fa1a83ba..b835f8975c528f94fa884553ed5c5316f9d75330 100644 (file)
@@ -52,7 +52,6 @@ class WeiboIE(InfoExtractor):
             method = 'POST'
             )
         webpage,urlh = self._download_webpage_handle(r_genvisitor, video_id, note="gen visitor")
-        print("webpage", webpage)
 
         p = webpage.split("&&")[1] # split "gen_callback && gen_callback(...)"
         i1 = p.find('{')
@@ -90,13 +89,13 @@ class WeiboIE(InfoExtractor):
             if isinstance(f, list):
                 if len(f) > 0:
                     vid_url = f[0]
-                    print("%s:%s" % (res, vid_url))
                     formats.append({
-                        'url': vid_url
+                        'url': vid_url,
+                        'format': 'mp4',
+                        'height': int(res),
                         })
         self._sort_formats(formats)
         uploader = self._og_search_property('nick-name', webpage, 'uploader', default = None)
-        print(title, uploader)
         return {
                 'id': video_id,
                 'title': title,