ebec893656 | ||
---|---|---|
assets | ||
src | ||
test | ||
.gitignore | ||
.mocharc.json | ||
ISSUE1.md | ||
README.md | ||
audio-test.js | ||
ecosystem.config.cjs | ||
export.js | ||
index.ts | ||
package.json | ||
pnpm-lock.yaml | ||
taco.html | ||
testdex.js | ||
tsconfig.json |
README.md
scout
Installation
Dependencies
ffplay
Usage
Daemon mode. Log chat and room events
node ./dist/index.js daemon
Dossier mode. Get a room's initialRoomDossier. Helpful for getting a room's Chaturbate ID.
node ./dist/index.js dossier -r projektmelody
Dev notes
Future idea: Export mode. Export sql chat messages as IndexedDB
test
TUI
A live table which shows ongoing active subscriptions
Room | Message | Silence | Status | Title | Tip | Password |
---|---|---|---|---|---|---|
pro. | x | |||||
el_. | x | |||||
sky. | x |
We're going to need to refactor the code a bit.
First we need an eventloop of sorts. A thing to ensure that we are always subscribing to the correct rooms and the correct Ably channels.
I think it needs to go like this.
- Startup
- Get list of rooms we are watching
- For each room,
- subscribe to status channel
- if we are unable to subcribe,
- subscribe to password channel (? does this work in pw mode ?)
- When status channel tells us a room goes live,
- subscribe to message, silence, title, tip, and pw channels.
- When status channel tells us a room goes offline,
- wait 5 mins
- stop this process if room is online again
- unsubscribe from everything except status ch.
Ably realtime event formats
room:notice:
{
"name": "room:notice:6DDY7ZC",
"id": "u-Y6UQ8JV3:0:0",
"encoding": null,
"data": {
"tid": "16755044232:9830",
"ts": 1675504423.225136,
"messages": [
" %%%[emoticon stwad2|https://static-pub.highwebmedia.com/uploads/avatar/2022/11/26/01/46/adec68059ed40d9dbb78260c9a46871c8c2070c4.jpg|76|78|/emoticon_report_abuse/stwad2/]%%% skinny_sis's Spin the Wheel ",
" Tip 33 tokens and you can win one of the 12 prizes ",
" Chance of winning: 67%. Type /wheel for the prizes "
],
"to_user": "",
"notice_type": "app",
"foreground": "rgb(103,77,255)",
"background": null,
"weight": "bolder",
"method": "lazy",
"pub_ts": 1675504423.230338
}
}
room:title_change:
{
"name": "room:title_change:6DDY7ZC",
"id": "vAj6M1bn9D:0:0",
"encoding": null,
"data": {
"tid": "16755100793:8346",
"ts": 1675510079.3160765,
"title": "❤️CUM SHOW❤️ Pvt is open 30per/min [1386 tokens left] #bigboobs #teen #18 #new #asian",
"pub_ts": 1675510079.3162484,
"method": "single"
}
}
room:update:
{
"name": "room:update:6DDY7ZC",
"id": "meLVS3wTan:0:0",
"encoding": null,
"data": {
"tid": "16755100794:436",
"ts": 1675510079.4469855,
"target": "refresh_panel",
"target_user": "",
"pub_ts": 1675510079.4471552,
"method": "single"
}
}
room:status::0
{
"name": "room:status:ZF09ZAC:1",
"id": "cCs6ThzT-p:0:0",
"encoding": null,
"data": {
"tid": "16755114015:96114",
"ts": 1675511401.588585,
"status": "away",
"message": "",
"hash": "",
"method": "lazy",
"pub_ts": 1675511401.5939016
}
}
{
"name": "room:status:ZF09ZAC:1",
"id": "Zk1EF44xrP:0:0",
"encoding": null,
"data": {
"tid": "16755114435:80861",
"ts": 1675511443.533211,
"status": "public",
"message": "",
"hash": "",
"pub_ts": 1675511443.5339801,
"method": "single"
}
}
room:update:
{
"name": "room:update:ZF09ZAC",
"id": "vOqwMouvAB:0:0",
"encoding": null,
"data": {
"tid": "16755118892:73991",
"ts": 1675511889.2104225,
"target": "refresh_panel",
"target_user": "",
"pub_ts": 1675511889.2105591,
"method": "single"
}
}
room:status::0
{
"name": "room:status:ZF09ZAC:1",
"id": "gs04uEHZTV:0:0",
"encoding": null,
"data": {
"tid": "16755147455:43279",
"ts": 1675514745.5818536,
"status": "offline",
"message": "",
"hash": "",
"pub_ts": 1675514745.5831933,
"method": "single"
}
}
debug: handling room error. Bad Request {"service":"futureporn/scout","timestamp":"2023-11-20T19:44:44.535Z"}
debug: handling room error. Bad Request {"service":"futureporn/scout","timestamp":"2023-11-20T19:44:44.536Z"}
debug: Ably authCallback. Getting a fresh new Ably TokenRequest. {"service":"futureporn/scout","timestamp":"2023-11-20T19:44:44.537Z"}
debug: getting pushServiceAuth. {"service":"futureporn/scout","timestamp":"2023-11-20T19:44:44.537Z"}
debug: using cookie string csrftoken=gQUnyHUTg7lZBTNn374s96a7DYAVxqZ5xrPi2RzWfrzJT61EfrLHvr6wFRMwhcUz; sbr=sec:sbref421fda-4ec5-4a7f-93ea-9a74a8c85484:1qdk9F:movx7uli5YEZ4UNB_GPURHopOLI {"service":"futureporn/scout","timestamp":"2023-11-20T19:44:44.537Z"}
debug: {"token":null,"channels":{"RoomMessageTopic#RoomMessageTopic:G0TWFS5":"room:grouped:G0TWFS5:16","RoomStatusTopic#RoomStatusTopic:G0TWFS5":"room:grouped:G0TWFS5:16","RoomTipAlertTopic#RoomTipAlertTopic:G0TWFS5":"room:grouped:G0TWFS5:16","RoomPasswordProtectedTopic#RoomPasswordProtectedTopic:G0TWFS5":"room:grouped:G0TWFS5:16"},"failures":{"RoomMessageTopic#RoomMessageTopic:G0TWFS5":"Bad Request","RoomStatusTopic#RoomStatusTopic:G0TWFS5":"Bad Request","RoomTipAlertTopic#RoomTipAlertTopic:G0TWFS5":"Bad Request","RoomPasswordProtectedTopic#RoomPasswordProtectedTopic:G0TWFS5":"Bad Request"},"token_request":{},"client_id":"-anonef421fda-4ec5-4a7f-93ea-9a74a8c85484","settings":{"backend":"a","flags":{"pm_enabled":true,"wowza_disabled":true,"userlist_enabled":true,"verify_enabled":false,"fallback_eligible":true,"is_live":true},"rest_host":"realtime.pa.highwebmedia.com","realtime_host":"realtime.pa.highwebmedia.com","fallback_hosts":["a-fallback.pa.highwebmedia.com","b-fallback.pa.highwebmedia.com","c-fallback.pa.highwebmedia.com","d-fallback.pa.highwebmedia.com","e-fallback.pa.highwebmedia.com"]}} {"service":"futureporn/scout","timestamp":"2023-11-20T19:44:46.747Z"}
restHost:realtime.pa.highwebmedia.com >> realtimeHost:realtime.pa.highwebmedia.com >> fallbackHosts:a-fallback.pa.highwebmedia.com,b-fallback.pa.highwebmedia.com,c-fallback.pa.highwebmedia.com,d-fallback.pa.highwebmedia.com,e-fallback.pa.highwebmedia.com
debug: Got a new TokenRequest {"service":"futureporn/scout","timestamp":"2023-11-20T19:44:46.748Z"}
debug: {} {"service":"futureporn/scout","timestamp":"2023-11-20T19:44:46.748Z"}
11:44:46.748 Ably: Auth.requestToken(): Expected token request callback to call back with a token string, token request object, or token details object