diff --git a/coursera-dl b/coursera-dl deleted file mode 120000 index 82edbf9..0000000 --- a/coursera-dl +++ /dev/null @@ -1 +0,0 @@ -coursera/coursera_dl.py \ No newline at end of file diff --git a/coursera-dl b/coursera-dl new file mode 100755 index 0000000..88a1e6c --- /dev/null +++ b/coursera-dl @@ -0,0 +1,6 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from coursera import coursera_dl + +coursera_dl.main() diff --git a/coursera/cookies.py b/coursera/cookies.py index 3586c62..aee1f64 100644 --- a/coursera/cookies.py +++ b/coursera/cookies.py @@ -11,8 +11,8 @@ import StringIO import requests -from define import AUTH_URL, CLASS_URL, AUTH_REDIRECT_URL, PATH_COOKIES -from utils import mkdir_p +from .define import AUTH_URL, CLASS_URL, AUTH_REDIRECT_URL, PATH_COOKIES +from .utils import mkdir_p # Monkey patch cookielib.Cookie.__init__. diff --git a/coursera/coursera_dl.py b/coursera/coursera_dl.py index 55534bb..5f47051 100755 --- a/coursera/coursera_dl.py +++ b/coursera/coursera_dl.py @@ -63,13 +63,13 @@ except ImportError: BeautifulSoup = lambda page: BeautifulSoup_(page, 'html.parser') -from cookies import ( +from .cookies import ( AuthenticationFailed, ClassNotFound, get_cookies_for_class, make_cookie_values) -from credentials import get_credentials, CredentialsError -from define import CLASS_URL, ABOUT_URL -from downloaders import get_downloader -from utils import clean_filename, get_anchor_format, mkdir_p, fix_url +from .credentials import get_credentials, CredentialsError +from .define import CLASS_URL, ABOUT_URL +from .downloaders import get_downloader +from .utils import clean_filename, get_anchor_format, mkdir_p, fix_url def get_syllabus_url(class_name, preview):