{"record":{"id":"09a58d8a8a276ac9","repo":"ytdl-org/youtube-dl","slug":"this-tumblr-may-contain-sensitive-media-disable-s","errorCode":null,"errorMessage":"This Tumblr may contain sensitive media. Disable safe mode in your account settings at https://www.tumblr.com/settings/account#safe_mode","messagePattern":"This Tumblr may contain sensitive media\\. Disable safe mode in your account settings at https://www\\.tumblr\\.com/settings/account#safe_mode","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/tumblr.py","lineNumber":155,"sourceCode":"                'login errors', default='[]'),\n            None, fatal=False)\n        if login_errors:\n            raise ExtractorError(\n                'Unable to login: %s' % login_errors[0], expected=True)\n\n        self.report_warning('Login has probably failed')\n\n    def _real_extract(self, url):\n        m_url = re.match(self._VALID_URL, url)\n        video_id = m_url.group('id')\n        blog = m_url.group('blog_name')\n\n        url = 'http://%s.tumblr.com/post/%s/' % (blog, video_id)\n        webpage, urlh = self._download_webpage_handle(url, video_id)\n\n        redirect_url = urlh.geturl()\n        if 'tumblr.com/safe-mode' in redirect_url or redirect_url.startswith('/safe-mode'):\n            raise ExtractorError(\n                'This Tumblr may contain sensitive media. '\n                'Disable safe mode in your account settings '\n                'at https://www.tumblr.com/settings/account#safe_mode',\n                expected=True)\n\n        iframe_url = self._search_regex(\n            r'src=\\'(https?://www\\.tumblr\\.com/video/[^\\']+)\\'',\n            webpage, 'iframe url', default=None)\n        if iframe_url is None:\n            return self.url_result(redirect_url, 'Generic')\n\n        iframe = self._download_webpage(iframe_url, video_id, 'Downloading iframe page')\n\n        duration = None\n        sources = []\n\n        sd_url = self._search_regex(\n            r'<source[^>]+src=([\"\\'])(?P<url>.+?)\\1', iframe,","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/tumblr.py#L137-L173","documentation":"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.","triggerScenarios":"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.","commonSituations":"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).","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"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    ydl.extract_info(tumblr_post_url)\nexcept ExtractorError as e:\n    if e.expected and 'safe mode' in str(e):\n        mark_sensitive(blog)  # or retry with authenticated, safe-mode-off cookies","preventionTips":["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"],"tags":["extractor","tumblr","safe-mode","age-restriction","expected"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}