mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-10 00:58:17 +02:00
Always determine youtube description
This commit is contained in:
parent
c4105fa035
commit
ff3a2b8eab
@ -901,7 +901,7 @@ def _download_with_rtmpdump(self, filename, url, player_url):
|
||||
# possible. This is part of rtmpdump's normal usage, AFAIK.
|
||||
basic_args = ['rtmpdump', '-q'] + [[], ['-W', player_url]][player_url is not None] + ['-r', url, '-o', tmpfilename]
|
||||
args = basic_args + [[], ['-e', '-k', '1']][self.params.get('continuedl', False)]
|
||||
if self.params['verbose']:
|
||||
if self.params.get('verbose', False):
|
||||
try:
|
||||
import pipes
|
||||
shell_quote = lambda args: ' '.join(map(pipes.quote, args))
|
||||
@ -1381,8 +1381,7 @@ def _real_extract(self, url):
|
||||
lxml.etree
|
||||
except NameError:
|
||||
video_description = u'No description available.'
|
||||
if self._downloader.params.get('forcedescription', False) or self._downloader.params.get('writedescription', False):
|
||||
mobj = re.search(r'<meta name="description" content="(.*)"(?:\s*/)?>', video_webpage)
|
||||
mobj = re.search(r'<meta name="description" content="(.*?)">', video_webpage)
|
||||
if mobj is not None:
|
||||
video_description = mobj.group(1).decode('utf-8')
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user