From: Sergey M․ Date: Wed, 20 Feb 2019 22:59:07 +0000 (+0700) Subject: [metacafe] Fix family filter bypass (closes #19287) X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=caf48f557a8f4f904c88346bcfc462069b8745bc;p=youtube-dl [metacafe] Fix family filter bypass (closes #19287) --- diff --git a/youtube_dl/extractor/metacafe.py b/youtube_dl/extractor/metacafe.py index 28f59f63c..9e92416d1 100644 --- a/youtube_dl/extractor/metacafe.py +++ b/youtube_dl/extractor/metacafe.py @@ -1,12 +1,13 @@ from __future__ import unicode_literals +import json import re from .common import InfoExtractor from ..compat import ( compat_parse_qs, + compat_urllib_parse, compat_urllib_parse_unquote, - compat_urllib_parse_urlencode, ) from ..utils import ( determine_ext, @@ -144,7 +145,7 @@ class MetacafeIE(InfoExtractor): headers = { # Disable family filter - 'Cookie': 'user=%s; ' % compat_urllib_parse_urlencode({'ffilter': False}) + 'Cookie': 'user=%s; ' % compat_urllib_parse.quote(json.dumps({'ffilter': False})) } # AnyClip videos require the flashversion cookie so that we get the link