This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Обновление selfie-schedule до v2.2 (UU Суперметалл fix + service-first config) | |
| set -e | |
| echo ">>> Backup yclients-widget.js / parser.js / config.json" | |
| cp /opt/selfie-schedule/yclients-widget.js /opt/selfie-schedule/yclients-widget.js.bak | |
| cp /opt/selfie-schedule/parser.js /opt/selfie-schedule/parser.js.bak | |
| cp /opt/selfie-schedule/config.json /opt/selfie-schedule/config.json.bak | |
| echo ">>> Скачивание новых файлов" | |
| curl -sSL "https://gist.githubusercontent.com/Lprog2000/ee3f1bf3864b24542159123d85de1149/raw/yclients-widget.js" > /opt/selfie-schedule/yclients-widget.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "competitors": [ | |
| { | |
| "name": "Интроверт", | |
| "provider": "yclients", | |
| "formId": 1023104, | |
| "companyId": 948858, | |
| "locations": [ | |
| { | |
| "name": "Флакон", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env node | |
| /** | |
| * Парсер расписания селфи-студий Москвы | |
| * Провайдеры: YClients, Dikidi, UU, СЕЛФКЛИК | |
| * Запуск: node parser.js [--date YYYY-MM-DD] | |
| */ | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const https = require('https'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Обновить yclients-widget.js v2.1 (full chromium fallback) и прогнать парсер | |
| set -e | |
| echo ">>> Обновление yclients-widget.js" | |
| curl -sSL https://is.gd/t8wUsY > /opt/selfie-schedule/yclients-widget.js | |
| echo ">>> Размер: $(wc -c < /opt/selfie-schedule/yclients-widget.js) bytes" | |
| echo ">>> Запуск парсера" | |
| cd /opt/selfie-schedule | |
| bash run.sh 2>&1 | tail -80 | |
| echo ">>> Готово. Сводка ушла в Telegram если YClients ожили." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * YClients widget parser | |
| * Открывает виджет одной студии (n{formId}.yclients.com), перехватывает headers | |
| * из первого Angular-запроса (включая x-app-client-context от WASM signer), | |
| * затем для каждого зала (staff_id) POST'ит search-timeslots с этими headers. | |
| * | |
| * Требует: playwright, headless Chromium. | |
| */ | |
| const { chromium } = require('playwright'); | |
| const fs = require('fs'); |