There's no video in this tweet.
Package:
youtube-dl
99648

Exception Class:
ExtractorError
Raise code
'thumbnails': thumbnails,
'duration': int_or_none(get_binding_value(
'content_duration_seconds')),
})
else:
expanded_url = try_get(status, lambda x: x['entities']['urls'][0]['expanded_url'])
if not expanded_url:
raise ExtractorError("There's no video in this tweet.")
info.update({
'_type': 'url',
'url': expanded_url,
})
return info
🙏 Scream for help to Ukraine
Today, 14th August 2022, Russia continues bombing and firing Ukraine. Don't trust Russia, they are bombing us and brazenly lying in same time they are not doing this 😠, civilians and children are dying too!
We are screaming and asking exactly you to help us, we want to survive, our families, children, older ones.
Please spread the information, and ask your governemnt to stop Russia by any means. We promise to work extrahard after survival to make the world safer place for all.
Please spread the information, and ask your governemnt to stop Russia by any means. We promise to work extrahard after survival to make the world safer place for all.
Links to the raise (1)
https://github.com/ytdl-org/youtube-dl/blob/dfbbe2902fc67f0f93ee47a8077c148055c67a9b/youtube_dl/extractor/twitter.py#L572Ways to fix
This happens in youtube_dl
libraries when given the wrong tweet link.
How to reproduce the error:
pip install youtube_dl
import youtube_dl
youtube_dl.YoutubeDL().extract_info("https://twitter.com/seesthepoint/status/1431724158220738563")
The error:
---------------------------------------------------------------------------
ExtractorError Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/youtube_dl/YoutubeDL.py in wrapper(self, *args, **kwargs)
814 try:
--> 815 return func(self, *args, **kwargs)
816 except GeoRestrictedError as e:
/usr/local/lib/python3.7/dist-packages/youtube_dl/YoutubeDL.py in __extract_info(self, url, ie, download, extra_info, process)
835 def __extract_info(self, url, ie, download, extra_info, process):
--> 836 ie_result = ie.extract(url)
837 if ie_result is None: # Finished already (backwards compatibility; listformats and friends should be moved here)
/usr/local/lib/python3.7/dist-packages/youtube_dl/extractor/common.py in extract(self, url)
533 self.initialize()
--> 534 ie_result = self._real_extract(url)
535 if self._x_forwarded_for_ip:
/usr/local/lib/python3.7/dist-packages/youtube_dl/extractor/twitter.py in _real_extract(self, url)
571 if not expanded_url:
--> 572 raise ExtractorError("There's no video in this tweet.")
573 info.update({
ExtractorError: There's no video in this tweet.; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
During handling of the above exception, another exception occurred:
DownloadError Traceback (most recent call last)
<ipython-input-45-491a289bffea> in <module>()
1 import youtube_dl
----> 2 youtube_dl.YoutubeDL().extract_info("https://twitter.com/seesthepoint/status/1431724158220738563")
/usr/local/lib/python3.7/dist-packages/youtube_dl/YoutubeDL.py in extract_info(self, url, download, ie_key, extra_info, process, force_generic_extractor)
806 'and will probably not work.')
807
--> 808 return self.__extract_info(url, ie, download, extra_info, process)
809 else:
810 self.report_error('no suitable InfoExtractor for URL %s' % url)
/usr/local/lib/python3.7/dist-packages/youtube_dl/YoutubeDL.py in wrapper(self, *args, **kwargs)
822 self.report_error(msg)
823 except ExtractorError as e: # An error we somewhat expected
--> 824 self.report_error(compat_str(e), e.format_traceback())
825 except MaxDownloadsReached:
826 raise
/usr/local/lib/python3.7/dist-packages/youtube_dl/YoutubeDL.py in report_error(self, message, tb)
626 _msg_header = 'ERROR:'
627 error_message = '%s %s' % (_msg_header, message)
--> 628 self.trouble(error_message, tb)
629
630 def report_file_already_downloaded(self, file_name):
/usr/local/lib/python3.7/dist-packages/youtube_dl/YoutubeDL.py in trouble(self, message, tb)
596 else:
597 exc_info = sys.exc_info()
--> 598 raise DownloadError(message, exc_info)
599 self._download_retcode = 1
600
DownloadError: ERROR: There's no video in this tweet.; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
How to fix it:
Make sure the given link is a correct url of a tweet that has a video.
import youtube_dl
youtube_dl.YoutubeDL().extract_info("https://twitter.com/TheWorldOfFunny/status/1431713499932250121")
Add a possible fix
Please authorize to post fix