vyoma_download package

Submodules

vyoma_download.cli module

Console script for vyoma_download.

vyoma_download.cli.main()[source]

vyoma_download.vyoma_download module

Vyoma Class

class vyoma_download.vyoma_download.Course(url_or_id, user)[source]

Bases: object

base_url = 'https://www.sanskritfromhome.in/course'
download_audios()[source]

Wrapper to download only audio links

download_content(document=True, audio=True, video=True)[source]

Download course content (audios, documents and video-links)

document : bool, optional
If True, download document links. The default is True.
audio : bool, optional
If True, download audio links. The default is True.
video : bool, optional
If True, download video links. The default is True.
status : bool
True if the download funcion completed successfully. Does not mean that all the files were downloaded successfully.
download_documents(course_id)[source]

Wrapper to download only document links

Wrapper to download only video links

extract_id(url_or_id)[source]

Extract course ID from a URL

extract_information(latest=False)[source]

Extract meta information from a course page

Fetch all links of downloadable content for a course.

links : dict
Links to audio, video and documents from the course.
fetch_page()[source]

Get contents of the course page

RuntimeError
If called without a valid login.
html
HTML content of the course page.
get(*args, **kwargs)[source]
load_progress()[source]

Load download progress

Progress is a dictionary of links with meta-information. Meta-information is a dictionary, loaded as an instance of Link().

pattern = '(http(s|)://|)(www.|)sanskritfromhome.in/course/([^/]*)'
post(*args, **kwargs)[source]
save_progress()[source]

Save download progress

Link() class is serialized asdict() for each link. Links are then stored as a dictionary.

show_status()[source]

Show the status of the course content

subscribe()[source]

Subscribe to the course

Bases: object

complete = False
date = None
path = None
class vyoma_download.vyoma_download.User(username, password, download_dir=None)[source]

Bases: object

get(*args, **kwargs)[source]
get_courses()[source]
home_url = 'https://www.sanskritfromhome.in'
login()[source]

Login to sanskritfromhome.in

login_url = 'https://www.sanskritfromhome.in/wp-admin/admin-ajax.php'
post(*args, **kwargs)[source]

Module contents

Top-level package for vyoma-download.