def get(self):
        data = self.get_urldata()

        if self.exclude(self.options):
            yield ServiceError("Excluding video")
            return

        match = re.search('data-aptomaId="([-0-9a-z]+)"', data)
        if not match:
            match = re.search('data-player-config="([^"]+)"', data)
            if not match:
                yield ServiceError("Can't find video info")
                return
            janson = json.loads(decode_html_entities(match.group(1)))
            videoId = janson["videoId"]
        else:
            videoId = match.group(1)
            match = re.search(r'data-isLive="(\w+)"', data)
            if not match:
                yield ServiceError("Can't find live info")
                return
            if match.group(1) == "true":
                self.options.live = True

        if not self.options.live:
            dataurl = "http://aftonbladet-play-metadata.cdn.drvideo.aptoma.no/video/%s.json" % videoId
            data = self.http.request("get", dataurl).text
            data = json.loads(data)
            videoId = data["videoId"]

        streamsurl = "http://aftonbladet-play-static-ext.cdn.drvideo.aptoma.no/actions/video/?id=%s&formats&callback=" % videoId
        data = self.http.request("get", streamsurl).text
        streams = json.loads(data)
        hlsstreams = streams["formats"]["hls"]
        if "level3" in hlsstreams.keys():
            hls = hlsstreams["level3"]
        else:
            hls = hlsstreams["akamai"]
        if "csmil" in hls.keys():
            hls = hls["csmil"][0]
        else:
            hls = hls["m3u8"][0]
        address = hls["address"]
        path = hls["path"]

        for i in hls["files"]:
            if "filename" in i.keys():
                plist = "http://%s/%s/%s/master.m3u8" % (address, path, i["filename"])
            else:
                plist = (address, path, hls["filename"]) % "http://%s/%s/%s"

            streams = hlsparse(self.options, self.http.request("get", plist), plist)
            if streams:
                for n in list(streams.keys()):
                    yield streams[n]
dataset/ETHPy150Open spaam/svtplay-dl/lib/svtplay_dl/service/aftonbladet.py/Aftonbladet.get/swapped operands of `%`