[weibo] add 'movies' option (#6988)
disable 'movie' downloads by default
This commit is contained in:
@@ -33,6 +33,7 @@ class WeiboExtractor(Extractor):
|
||||
self.livephoto = self.config("livephoto", True)
|
||||
self.retweets = self.config("retweets", False)
|
||||
self.videos = self.config("videos", True)
|
||||
self.movies = self.config("movies", False)
|
||||
self.gifs = self.config("gifs", True)
|
||||
self.gifs_video = (self.gifs == "video")
|
||||
|
||||
@@ -134,7 +135,10 @@ class WeiboExtractor(Extractor):
|
||||
if "page_info" in status:
|
||||
info = status["page_info"]
|
||||
if "media_info" in info and self.videos:
|
||||
append(self._extract_video(info["media_info"]))
|
||||
if info.get("type") != "5" or self.movies:
|
||||
append(self._extract_video(info["media_info"]))
|
||||
else:
|
||||
self.log.debug("%s: Ignoring 'movie' video", status["id"])
|
||||
|
||||
def _extract_video(self, info):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user