aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2019-02-21 05:59:07 +0700
committerSergey M․ <dstftw@gmail.com>2019-02-21 05:59:07 +0700
commitcaf48f557a8f4f904c88346bcfc462069b8745bc (patch)
treec58b63654b93366154457affa5756f6e9061f30c /youtube_dl/extractor
parent77a842c8926625fe791ed36613f183bb195394cb (diff)
[metacafe] Fix family filter bypass (closes #19287)
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/metacafe.py5
1 files changed, 3 insertions, 2 deletions
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