mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-11-19 07:55:16 +00:00
This reverts commit b827ee921f.
This commit is contained in:
@@ -4,6 +4,7 @@ from __future__ import unicode_literals
|
||||
import re
|
||||
|
||||
from .common import InfoExtractor
|
||||
from ..compat import compat_str
|
||||
from ..utils import (
|
||||
ExtractorError,
|
||||
int_or_none,
|
||||
@@ -150,7 +151,7 @@ class TumblrIE(InfoExtractor):
|
||||
url = 'http://%s.tumblr.com/post/%s/' % (blog, video_id)
|
||||
webpage, urlh = self._download_webpage_handle(url, video_id)
|
||||
|
||||
redirect_url = urlh.geturl()
|
||||
redirect_url = compat_str(urlh.geturl())
|
||||
if 'tumblr.com/safe-mode' in redirect_url or redirect_url.startswith('/safe-mode'):
|
||||
raise ExtractorError(
|
||||
'This Tumblr may contain sensitive media. '
|
||||
|
||||
Reference in New Issue
Block a user