aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/livestreamer/stream/http.py
blob: f6fce57cb056429d96054c64cb8536b4192592f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from . import Stream, StreamError
from ..utils import urlget

class HTTPStream(Stream):
    def __init__(self, session, url, **args):
        Stream.__init__(self, session)

        self.url = url
        self.args = args

    def open(self):
        res = urlget(self.url, prefetch=False,
                     exception=StreamError,
                     **self.args)

        return res.raw