Skip to content

Commit

Permalink
fix for wrong urls (#29, #11)
Browse files Browse the repository at this point in the history
  • Loading branch information
wilddom committed Oct 13, 2015
1 parent d2865f4 commit 0a15ab5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Memrise_Course_Importer/memrise.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,8 @@ def getJsonLevelUrl(courseId, levelIndex):
def toAbsoluteMediaUrl(url):
if not url:
return url
# fix wrong urls: /static/xyz should map to http://static.memrise.com/xyz
url = re.sub("^\/static\/", "/", url)
return urlparse.urljoin(u"http://static.memrise.com/", url)

def downloadMedia(self, url, skipExisting=False):
Expand Down

0 comments on commit 0a15ab5

Please sign in to comment.