ytdl-org/youtube-dl · error · ExtractorError
This Tumblr may contain sensitive media. Disable safe mode i
Error message
This Tumblr may contain sensitive media. Disable safe mode in your account settings at https://www.tumblr.com/settings/account#safe_mode
What it means
Raised by TumblrIE when, after fetching the post, the final redirect URL points at tumblr.com/safe-mode: Tumblr flagged the blog as containing sensitive media and is gating it behind the (logged-in) safe-mode toggle. Expected=True; the message tells the user to disable safe mode in account settings.
Source
Thrown at youtube_dl/extractor/tumblr.py:155
'login errors', default='[]'),
None, fatal=False)
if login_errors:
raise ExtractorError(
'Unable to login: %s' % login_errors[0], expected=True)
self.report_warning('Login has probably failed')
def _real_extract(self, url):
m_url = re.match(self._VALID_URL, url)
video_id = m_url.group('id')
blog = m_url.group('blog_name')
url = 'http://%s.tumblr.com/post/%s/' % (blog, video_id)
webpage, urlh = self._download_webpage_handle(url, video_id)
redirect_url = urlh.geturl()
if 'tumblr.com/safe-mode' in redirect_url or redirect_url.startswith('/safe-mode'):
raise ExtractorError(
'This Tumblr may contain sensitive media. '
'Disable safe mode in your account settings '
'at https://www.tumblr.com/settings/account#safe_mode',
expected=True)
iframe_url = self._search_regex(
r'src=\'(https?://www\.tumblr\.com/video/[^\']+)\'',
webpage, 'iframe url', default=None)
if iframe_url is None:
return self.url_result(redirect_url, 'Generic')
iframe = self._download_webpage(iframe_url, video_id, 'Downloading iframe page')
duration = None
sources = []
sd_url = self._search_regex(
r'<source[^>]+src=(["\'])(?P<url>.+?)\1', iframe,View on GitHub (pinned to 956b8c5855)
Solutions
- Log in to Tumblr in a browser, disable safe mode at tumblr.com/settings/account#safe_mode, export cookies, and run with --cookies (yt-dlp)
- Verify the blog still exists; if it was removed, the redirect also lands on safe-mode and no fix exists
- Catch this expected error in batch jobs and tag URLs as sensitive-flagged
- Update to yt-dlp for current Tumblr handling
Defensive patterns
Strategy: try-catch
Try / catch
try:
ydl.extract_info(tumblr_post_url)
except ExtractorError as e:
if e.expected and 'safe mode' in str(e):
mark_sensitive(blog) # or retry with authenticated, safe-mode-off cookies Prevention
- Log in and disable safe mode, then export cookies before extraction
- Sensitive-flagged blogs need an authorized session; anonymous access always fails
- Note the blog may simply be deleted — verify in a browser
When it happens
Trigger: Downloading a post on an adult-flagged Tumblr blog while not logged in (or with safe mode on): _download_webpage_handle follows the redirect to /safe-mode and the extractor aborts.
Common situations: NSFW-flagged blogs after the 2018 Tumblr content-policy changes; logged-out access to any sensitive-flagged blog; safe mode default-on for anonymous users. Since the policy changes, many such blogs are deleted outright (redirect persists, so the error still fires).
Related errors
- Unable to login: %s
- Bigo says: %s (code %s)
- This video is private
- Video %s does not exist
- This video is DRM protected.
AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14).
Data as JSON: /api/errors/09a58d8a8a276ac9.
Report an issue: GitHub.