Update CLI docs and remove unused DRM key logic

Expanded README with detailed CLI usage instructions and examples. Removed unused DRM key fetching logic and the get_missing_keys function from main.py and utilities.py to clean up the codebase.
This commit is contained in:
√(noham)²
2025-12-20 11:47:23 +01:00
parent 5dc55dbf62
commit 0f0fb975a6
3 changed files with 42 additions and 53 deletions

View File

@@ -46,7 +46,9 @@ API_URL=https://example.com/get-cached-keys
```
## Usage
### Via Command Line
### Interactive Mode
If you run the script without arguments, it will guide you through channel selection and date picking.
**Using uv:**
```bash
@@ -58,9 +60,43 @@ uv run main.py
python main.py
```
### Via CLI Arguments
### CLI Mode
You can automate the download by providing arguments.
```bash
uv run main.py --output-dir ./downloads -id channel_id --start DATE --end DATA -sv best -sa best
usage: main.py [-h] [--start-date START_DATE] [--end-date END_DATE] [--duration DURATION] [--channel-id CHANNEL_ID] [--video VIDEO] [--audio AUDIO]
[--title TITLE] [--username USERNAME] [--password PASSWORD] [--key KEY] [--output-dir OUTPUT_DIR] [--widevine-device WIDEVINE_DEVICE]
options:
-h, --help show this help message and exit
--start-date START_DATE
Start date and time in YYYY-MM-DD HH:MM:SS format
--end-date END_DATE End date and time in YYYY-MM-DD HH:MM:SS format
--duration DURATION Duration in HH:MM:SS format (alternative to --end-date)
--channel-id CHANNEL_ID
Channel ID to download from
--video VIDEO Video quality selection (e.g., 'best', '1080p', '720p', '1080p+best', '720p+worst')
--audio AUDIO Audio track selection (e.g., 'best', 'fra_main')
--title TITLE Title for the download (default: channel_id_start_date)
--username USERNAME Oqee username for authentication
--password PASSWORD Oqee password for authentication
--key KEY DRM key for decryption (can be specified multiple times)
--output-dir OUTPUT_DIR
Output directory for downloaded files (default: ./download)
--widevine-device WIDEVINE_DEVICE
Path to Widevine device file (default: ./widevine/device.wvd)
```
#### Examples
**Download a specific program with duration:**
```bash
uv run main.py --channel-id 536 --start-date "2025-12-19 12:00:00" --duration "01:30:00" --video "1080p+best" --audio "best" --title "MyMovie"
```
**Download with manual DRM keys:**
```bash
uv run main.py --channel-id 536 --start-date "2025-12-19 12:00:00" --duration "00:05:00" --key "KID:KEY" --key "KID2:KEY2"
```
## DRM Decryption
@@ -79,9 +115,9 @@ In order to decrypt DRM content, you will need to have a dumped CDM, after that
- [ ] Demo GIF
- [ ] Lint code
- [ ] Oqee widevine license implementation (.wvd) + mention README
- [ ] Full implementation
- [x] Full implementation
- [ ] Verify mp4ff installation
- [ ] CLI arguments implementation + documentation
- [x] CLI arguments implementation + documentation
- [ ] French/English full translation
- [ ] Better output system
- [ ] Add more comments in the code