summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/hoster/YoutubeCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugins/hoster/YoutubeCom.py')
-rw-r--r--pyload/plugins/hoster/YoutubeCom.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/pyload/plugins/hoster/YoutubeCom.py b/pyload/plugins/hoster/YoutubeCom.py
index 316eebd4b..319eb36e6 100644
--- a/pyload/plugins/hoster/YoutubeCom.py
+++ b/pyload/plugins/hoster/YoutubeCom.py
@@ -36,7 +36,7 @@ class YoutubeCom(Hoster):
__name__ = "YoutubeCom"
__type__ = "hoster"
__pattern__ = r"https?://(?:[^/]*?)youtube\.com/watch.*?[?&]v=.*"
- __version__ = "0.35"
+ __version__ = "0.38"
__config__ = [("quality", "sd;hd;fullhd;240p;360p;480p;720p;1080p;3072p", "Quality Setting", "hd"),
("fmt", "int", "FMT/ITAG Number (5-102, 0 for auto)", 0),
(".mp4", "bool", "Allow .mp4", True),
@@ -48,9 +48,6 @@ class YoutubeCom(Hoster):
__author_name__ = ("spoob", "zoidberg")
__author_mail__ = ("spoob@pyload.org", "zoidberg@mujmail.cz")
- # Invalid characters that must be removed from the file name
- invalidChars = ':?><"|\\'
-
# name, width, height, quality ranking, 3D
formats = {5: (".flv", 400, 240, 1, False),
6: (".flv", 640, 400, 4, False),
@@ -141,8 +138,7 @@ class YoutubeCom(Hoster):
name = re.search(file_name_pattern, html).group(1).replace("/", "")
# Cleaning invalid characters from the file name
- for c in self.invalidChars:
- name = name.replace(c, '_')
+ name = name.encode('ascii', 'replace')
pyfile.name = html_unescape(name)