mirror of
https://github.com/coursera-dl/coursera-dl.git
synced 2026-07-18 00:45:26 +00:00
Use the relative import syntax
This also means that the script has to be run as a package. Hence, we replace the coursers-dl symlink with a executable script that uses coursera_dl.main.
This commit is contained in:
parent
0560648eed
commit
ae96f0fa6d
3 changed files with 13 additions and 8 deletions
|
|
@ -1 +0,0 @@
|
|||
coursera/coursera_dl.py
|
||||
6
coursera-dl
Executable file
6
coursera-dl
Executable file
|
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from coursera import coursera_dl
|
||||
|
||||
coursera_dl.main()
|
||||
|
|
@ -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__.
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue