lossless1024 / StreaMonitor

Adult live stream downloader for advanced people. I could have chosen a better name.
GNU General Public License v3.0
172 stars 42 forks source link

SCVR not working anymore #110

Closed xAstroBoy closed 9 months ago

xAstroBoy commented 9 months ago

is downloading the flatscreen videos now, any fix or solutions?

a bit of inspect element, seems there is a api change that gives the vr stuff

https://edge-hls.doppiocdn.com/hls/73187643_vr/master/73187643_vr.m3u8?playlistType=lowLatency

i tried fixing the Playlist variant and i get nothing back.

Okay, some progress, once you get the playlist variant, append _vr to both stream ids and it works again, that's what it should be done.

@mK33y and @lossless1024

xAstroBoy commented 9 months ago

111 i fixed it here.

mK33y commented 9 months ago
import requests
from streamonitor.bot import Bot

class StripChatVR(Bot):
    site = 'StripChatVR'
    siteslug = 'SCVR'

    def getVideoUrl(self):
        return self.getWantedResolutionPlaylist(None)

    def getPlaylistVariants(self, url):
        def formatUrl(auto):
            return "https://edge-hls.{host}/hls/{id}_vr/master/{id}_vr.m3u8".format(
            server=self.lastInfo["cam"]["viewServers"]["flashphoner-vr"],
            host='doppiocdn.com',
            id=self.lastInfo["model"]["id"],
            auto='_auto' if auto else '')

        variants = []
        variants.extend(super().getPlaylistVariants(formatUrl(False)))
        variants.extend(super().getPlaylistVariants(formatUrl(True)))
        return variants

    def getStatus(self):
        r = requests.get('https://vr.stripchat.com/api/vr/v2/models/username/' + self.username, headers=self.headers)
        if r.status_code != 200:
            return Bot.Status.UNKNOWN

        self.lastInfo = r.json()

        if self.lastInfo["model"]["status"] == "public" and self.lastInfo["isCamAvailable"] and self.lastInfo['cam']["isCamActive"]:
            return Bot.Status.PUBLIC
        if self.lastInfo["model"]["status"] in ["private", "groupShow", "p2p", "virtualPrivate", "p2pVoice"]:
            return Bot.Status.PRIVATE
        if self.lastInfo["model"]["status"] in ["off", "idle"]:
            return Bot.Status.OFFLINE
        self.logger.warn(f'Got unknown status: {self.lastInfo["model"]["status"]}')
        return Bot.Status.UNKNOWN

Bot.loaded_sites.add(StripChatVR)

you do not need the "_vr" part. Just change it instead.

xAstroBoy commented 9 months ago
import requests
from streamonitor.bot import Bot

class StripChatVR(Bot):
    site = 'StripChatVR'
    siteslug = 'SCVR'

    def getVideoUrl(self):
        return self.getWantedResolutionPlaylist(None)

    def getPlaylistVariants(self, url):
        def formatUrl(auto):
            return "https://edge-hls.{host}/hls/{id}_vr/master/{id}_vr.m3u8".format(
            server=self.lastInfo["cam"]["viewServers"]["flashphoner-vr"],
            host='doppiocdn.com',
            id=self.lastInfo["model"]["id"],
            auto='_auto' if auto else '')

        variants = []
        variants.extend(super().getPlaylistVariants(formatUrl(False)))
        variants.extend(super().getPlaylistVariants(formatUrl(True)))
        return variants

    def getStatus(self):
        r = requests.get('https://vr.stripchat.com/api/vr/v2/models/username/' + self.username, headers=self.headers)
        if r.status_code != 200:
            return Bot.Status.UNKNOWN

        self.lastInfo = r.json()

        if self.lastInfo["model"]["status"] == "public" and self.lastInfo["isCamAvailable"] and self.lastInfo['cam']["isCamActive"]:
            return Bot.Status.PUBLIC
        if self.lastInfo["model"]["status"] in ["private", "groupShow", "p2p", "virtualPrivate", "p2pVoice"]:
            return Bot.Status.PRIVATE
        if self.lastInfo["model"]["status"] in ["off", "idle"]:
            return Bot.Status.OFFLINE
        self.logger.warn(f'Got unknown status: {self.lastInfo["model"]["status"]}')
        return Bot.Status.UNKNOWN

Bot.loaded_sites.add(StripChatVR)

you do not need the "_vr" part. Just change it instead.

yes, but asking the playlist still does not give back the vr stream for some weird reason from the site's changes, replacing the given url at the end works, and appending both _vr to both stream ids, makes sure is getting the vr stream.