Skip to content

Commit

Permalink
report only hls streams for livestream.com
Browse files Browse the repository at this point in the history
  • Loading branch information
kapetanos committed Oct 20, 2016
1 parent 8bc1e30 commit 5f32213
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/livestreamer/plugins/livestream.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,24 +91,24 @@ def _get_streams(self):
# Stream is not live
return

play_url = stream_info.get("play_url")
if play_url:
swf_url = info.get("playerUri")
if swf_url:
if not swf_url.startswith("http"):
swf_url = "http://" + swf_url

# Work around broken SSL.
swf_url = swf_url.replace("https://", "http://")

qualities = stream_info["qualities"]
for bitrate, stream in self._parse_smil(play_url, swf_url):
name = "{0}k".format(bitrate / 1000)
for quality in qualities:
if quality["bitrate"] == bitrate:
name = "{0}p".format(quality["height"])

yield name, stream
#play_url = stream_info.get("play_url")
#if play_url:
# swf_url = info.get("playerUri")
# if swf_url:
# if not swf_url.startswith("http"):
# swf_url = "http://" + swf_url

# # Work around broken SSL.
# swf_url = swf_url.replace("https://", "http://")

# qualities = stream_info["qualities"]
# for bitrate, stream in self._parse_smil(play_url, swf_url):
# name = "{0}k".format(bitrate / 1000)
# for quality in qualities:
# if quality["bitrate"] == bitrate:
# name = "{0}p".format(quality["height"])

# yield name, stream

m3u8_url = stream_info.get("m3u8_url")
if m3u8_url:
Expand Down

0 comments on commit 5f32213

Please sign in to comment.