Skip to content
Browse files

correction when the url has parameters

  • Loading branch information...
1 parent b25dd20 commit d316bd80ef63dc1a0d76cbbd5c2d53f5922800d8 @gcmalloc committed Sep 25, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 epfl/moodle.py
View
2 epfl/moodle.py
@@ -111,7 +111,7 @@ def fetch_document(self, document, directory=""):
parent_content_tag = soup.find('div', 'resourceworkaround')
content_url = parent_content_tag.find('a')['href']
- file_name = os.path.basename(content_url)
+ file_name = os.path.basename(urlparse.urlparse(content_url)[2])
file_path = os.path.join(directory, file_name)
file_in = self.session.get(content_url)

0 comments on commit d316bd8

Please sign in to comment.
Something went wrong with that request. Please try again.