StreaMonitor icon indicating copy to clipboard operation
StreaMonitor copied to clipboard

[Feature Request] Recording for hidden accounts on Strip

Open peps24 opened this issue 3 months ago • 3 comments

Many accounts are using Geoblock and IP ban recnetly. This only affects the Strip API, but not the streaming recording. If you know the playlist URL (using VPN), you can record with FFmpeg. Would a new proxy feature or something similar be possible to bypass the block and get the playlist?

peps24 avatar Sep 02 '25 15:09 peps24

just use VPN

HighOnBuffs avatar Sep 03 '25 19:09 HighOnBuffs

This is a temporary solution to obtain the JSON from another location without using a VPN. Patch for #stripchat.py

def getStatus(self):
        url = f'https://stripchat.com/api/front/v2/models/username/{self.username}/cam?uniq={StripChat.uniq()}'
        r = requests.get(
            url,
            headers=self.headers
        )

        try:
            data = r.json()
        except requests.exceptions.JSONDecodeError:
            self.log('Failed to parse JSON response')
            return Status.UNKNOWN

        if data['user'].get('isGeoBanned') is True:
            url_wrapper = 'https://your_api.com/api/proxy'

            data_wrapper = {
                'url': url,
                'method': 'GET',
                'headers': {
                    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0',
                },
                'data': {}
            }

            r = requests.post(url_wrapper, json=data_wrapper)
            if r.status_code != 200:
                return Status.UNKNOWN

            try:
                data = r.json()
            except requests.exceptions.JSONDecodeError:
                self.log('Failed to parse JSON response from proxy')
                return Status.UNKNOWN

        if 'cam' not in data:
            if 'error' in data:
                error = data['error']
                if error == 'Not Found':
                    return Status.NOTEXIST
                self.logger.warn(f'Status returned error from proxy: {error}')
            return Status.UNKNOWN

        self.lastInfo = {'model': data['user']['user']}
        if isinstance(data['cam'], dict):
            self.lastInfo |= data['cam']

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

To deploy, you could use Render.com or another service. Example with Node.js:

const express = require("express");
const axios = require("axios");

const app = express();
const port = 3000;

app.use(express.json());

app.post("/api/proxy", async (req, res) => {
  const { url, method = "GET", headers = {}, data = {} } = req.body;

  try {
    const response = await axios({
      method,
      url,
      headers,
      data,
    });

    res.json(response.data);
  } catch (error) {
    console.error("Error en la solicitud:", error.message);
    res.status(500).json({ error: "Ocurrió un error al hacer la solicitud" });
  }
});

app.listen(port, () => {
  console.log(`Server running on http://localhost:${port}`);
});

ndyanx avatar Nov 10 '25 01:11 ndyanx

Brilliant, I'll try it

peps24 avatar Nov 10 '25 14:11 peps24