Skip to content
This repository was archived by the owner on Nov 9, 2022. It is now read-only.

Commit 106349c

Browse files
committed
Fix TypeError for live streams
1 parent fbe671a commit 106349c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

downloader.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,10 @@ def download_stream(token, stream_url, output_file: Path, quality="720p", angle=
163163
if not variant_pls:
164164
print("Some error while getting", stream_url)
165165
return
166-
angle_playlists = get_angle_playlists(variant_pls)
166+
if "#EXT-X-KEY" in variant_pls: # normal pre-recorded stream
167+
angle_playlists = get_angle_playlists(variant_pls)
168+
else: # Unencrypted stream, probably live
169+
angle_playlists = {1: variant_pls.splitlines()}
167170

168171
if not angle_playlists:
169172
print("No video streams found")

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "ilc-scraper"
3-
version = "0.6.4"
3+
version = "0.7.0"
44
description = "A scraper for Impartus Lecture Capture videos for BITS Hyderabad"
55
authors = ["iamkroot <kroot.patel@gmail.com>"]
66
readme = "README.md"

0 commit comments

Comments
 (0)