Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions edx_dl/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@

# This module contains generic functions, ideally useful to any other module
from six.moves.urllib.request import urlopen, Request
from six.moves import html_parser

import sys
if sys.version_info[0] >= 3:
import html
else:
from six.moves import html_parser
html = html_parser.HTMLParser()

import errno
import json
Expand Down Expand Up @@ -119,7 +125,7 @@ def clean_filename(s, minimal_change=False):
"""

# First, deal with URL encoded strings
h = html_parser.HTMLParser()
h = html
s = h.unescape(s)

# strip paren portions which contain trailing time length (...)
Expand Down