-
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Contents:
Installing Python is no different than installing other apps for your OS. Go to downloads page on python.org. Download the latest version for your OS or any version older than 3.5. Then run Python installer and follow its steps.
Please let me know if you need additional guide (with screenshots) for installing Python for certain OS. I'll try to write such guide or help you individually.
When Python is installed you can execute script in command line (see Usage in readme file)
You can download one executable file for your OS. In this case you don't need to install Python.
I pre-bundled such files via PyInstaller for most popular platforms among desktop OS.
OS | File Name | Ver. 2.0.5 |
---|---|---|
Windows x64 (64 bit) | LEP-downloader.exe | Download |
macOS (64 bit) | LEP-downloader | Download |
Ubuntu (64 bit) | LEP-downloader | Download |
Windows x86 (32 bit) | LEP-downloader.exe | Download |
After downloading:
- (on macOS and Ubuntu) Set permission for this file with command:
chmod a+rx ~/Downloads/LEP-downloader
- (you can) Run this file by double clicking on it (on Windows and on macOS). This is equivalent to executing it in command line (Terminal) without arguments (i.e. all audio files). On Ubuntu such an easy way does not work, see below how to run it in Terminal
Pay attention: Your OS may find this file unsafe during the first run of it. For example on Windows 10 the window of Windows Defender SmartScreen warns you about this. If you trust a developer, click 'More info' link and then click 'Run anyway' button.
On other platforms, OS may request permission to change the folder, or also to first run the file. Do it carefully.
To execute file in command line (Terminal):
for macOS and Ubuntu users: open Terminal, navigate to the folder, for example cd ~/Downloads
, where executable file is located, and run it ./LEP-downloader
for Windows users: open command line (cmd) and the same steps (commands) will look something like this:
cd %USERPROFILE%/Downloads
LEP-downloader
I think few people will run the program (script) to download all the audio files. Therefore, several options (arguments) have been added with which you can download only certain episodes. Let's look at them.
I will give examples with executable file LEP-downloader.exe
without extension on Windows. Choose the way as you prefer: specify the extension or not. Both of them are appropriate.
On macOS and on Ubuntu don't forget to type ./
before the file name, i.e. ./LEP-downloader
If you execute as python script do not forget to specify the file extension and interpreter (when it's needed): python3 LEP-downloader.py
All of the following arguments (options) will work for python script as well.
Short version is: -h
For what: To display help message with all options and exit (stop execution)
LEP-downloader -h
Short version is: -ep
For what: To specify episode number (or range of episodes) for downloading
To download one numbered episode, examples:
LEP-downloader -ep 128
LEP-downloader --episode 3
To download range of numbered episodes, example:
LEP-downloader -ep 99-101
will download three episodes: 99, 100, 101
To download ALL episodes, execute:
LEP-downloader -ep 0-xxx
or
LEP-downloader
Both commands do the same.
Unnumbered episodes have number 0 inside the script. If you want to download all such episodes execute command:
LEP-downloader -ep 0
To download from one episode to the last episode, execute:
LEP-downloader -ep 79-xxx
Note: Unnumbered episodes will NOT be downloaded in this case.
Short version is: -pdf
For what: To download PDF files of exported webpages together with audio or video files. In case you don't want to open the episode's web page every time to find transcript or vocabulary.
Up to 280 episodes I exported each page manually. That's why these PDF files contains even "Discuss" comments. Then I got tired of doing it manually and with the WeasyPrint tool I got all the other PDF files automatically. They are already without "Discuss" comments (only main text).
To download all episodes (audio files) and its PDF:
LEP-downloader -pdf
You can combine this argument with others:
LEP-downloader -ep 333 -pdf
LEP-downloader --withpdf -ep 300-332
Short version is: -vi
For what: To download only video files from video episodes. If you prefer to watch videos rather than just listen to their audio tracks.
To download all video episodes:
LEP-downloader -vi
To download video files (if they exists) for certain range of episodes:
LEP-downloader -ep 0-200 -vi
To download all video episodes with its pdf:
LEP-downloader -vi -pdf
Short version is: -to
For what: To specify a path to custom download folder. If you do not want to download to the same folder where the executable file (or .py script) is located use this option.
To download files to the certain folder on Windows:
LEP-downloader -to D:\path\to\folder
or if path contains whitespace(s) wrap it in quotes " "
:
LEP-downloader -to "D:\path\to\folder with whitespace"
for macOS ans Ubuntu users:
./LEP-downloader -to /path/to/folder
Specified folder and all intermediate folders will be created if they do not already exist.
Assume our current directory is Downloads and executable file is here. No sub folders. If we execute this command:
./LEP-downloader --onlyvideo -to "LEP/video"
then all video files will be located in "video" folder (inside "LEP" inside "Downloads"). This way of specifying a relative path (with forward slash /
) also works fine on Windows.
Note: If you have not permission to create specified folder then execution will stop.
Short version is: -d1
For what: To specify a start date for date range filtering. Format "YYYY-MM-DD".
If you want to download episodes starting from a certain day to present day use this option. For example, to download all episodes since July 7 2017:
LEP-downloader -d1 2017-07-07
Short version is: -d2
For what: To specify an end date for date range filtering. Format "YYYY-MM-DD".
Opposite to -d1
, let you to download all episodes starting from the beginning to specified day.
LEP-downloader -d2 2018-12-31
Most often both of these options are used in conjunction.
LEP-downloader -d1 2010-01-01 -d2 2010-12-31
will download all episodes for 2010.
Note: Unnumbered episodes are also downloaded when we use filtering by date
Known issue: There is the minor bug (Issue #3) with info message when we use date arguments.