$recordStripChat = { ... }
$recordStripChat = { param ($url_stripchat, $model_name, $stream_quality, $save_directory, $curl_exe, $user_agent, $streamlink_exe, $waiting_time, $separate_directory, $proxy_list_path, $connect_timeout, $proxy_protocol, $to_use_proxy_list) function GetStatusCode ($url) { $curl_arg = "--silent", "--head", "--insecure", "--connect-timeout", "$connect_timeout", "--user-agent", "$user_agent", "--write-out", "%{http_code}", "--output", "nul", "--url", "$url" $status_code = & $curl_exe @curl_arg return $status_code } function GetStatusCodeAndLocationUrl ($url) { $curl_arg = "--silent", "--location", "--head", "--insecure", "--connect-timeout", "$connect_timeout", "--user-agent", "$user_agent", "--write-out", "%{http_code};%{url_effective}", "--output", "nul", "--url", "$url" $status_code = & $curl_exe @curl_arg return $status_code } while ($true) { if (!$stream_url) { if (!$id) { $curl_arg = "--silent", "--insecure", "--connect-timeout", "$connect_timeout", "--user-agent", "$user_agent", "--url", "$url_stripchat/api/front/users/username/$model_name/" $response = $null $response = & $curl_exe @curl_arg $json = $null if ($response) { $json = $response | ConvertFrom-Json if ($json) { $id = $json.user.id } } } if ($id) { if ($stream_quality -eq 'best') { $stream_url = 'https://edge-hls.doppiocdn.com/hls/{0}/master/{0}.m3u8' -f $id } else { $stream_url = 'https://edge-hls.doppiocdn.com/hls/{0}/master/{0}_auto.m3u8' -f $id } } } $start_rec = $false if ($stream_url) { $status_code, $location_url = $(GetStatusCodeAndLocationUrl -url $stream_url).Split(';') if ($status_code -eq 200) { $start_rec = $true } elseif ($stream_url -ne $location_url -and $location_url -match '^https:\/\/.+\.m3u8') { $stream_url = $location_url $status_code = GetStatusCode -url $stream_url if ($status_code -eq 200) { $start_rec = $true } } } if ($start_rec) { if ($separate_directory -eq 1 -and $save_directory -notmatch "$model_name\\?") { $save_directory = Join-Path $save_directory $model_name if (!(Test-Path $save_directory)) { New-Item -Path $save_directory -ItemType Directory -Force } } $date_time = Get-Date -format 'yyyy-MM-dd_HH-mm-ss' $file_name = 'StripChat-{0}-{1}.ts' -f $model_name, $date_time $output = Join-Path $save_directory $file_name if ($stream_quality -ne 'best') { $stream_quality = $stream_quality + ',best' } & $streamlink_exe --http-no-ssl-verify --stream-segment-threads 3 --default-stream $stream_quality --url $stream_url --output $output } Start-Sleep -seconds $waiting_time } }
Вчера, 23:19
5 сентября 2026 22:43
5 сентября 2026 20:07
5 сентября 2026 08:33
4 сентября 2026 20:18
4 сентября 2026 19:47
2 сентября 2026 18:41
2 сентября 2026 17:53
2 сентября 2026 13:25
2 сентября 2026 11:48
2 сентября 2026 10:10
2 сентября 2026 03:40
2 сентября 2026 03:23
31 августа 2026 23:57
3 сентября 2026 20:39
27 августа 2026 08:06
24 августа 2026 01:42
23 августа 2026 19:13
23 августа 2026 15:41
23 августа 2026 13:53
22 августа 2026 22:59
18 августа 2026 20:47
14 августа 2026 19:19
14 августа 2026 11:54
13 августа 2026 10:36
9 августа 2026 08:38
23 июля 2026 07:29
13 июля 2026 14:28
13 июля 2026 10:34
9 июля 2026 06:04
8 июля 2026 22:47
8 июля 2026 22:03
8 июля 2026 22:00
8 июля 2026 20:56
8 июля 2026 20:19
8 июля 2026 05:07
2 июля 2026 18:17
14 июня 2026 09:59
10 июня 2026 16:15
31 мая 2026 23:34
31 мая 2026 16:13
30 мая 2026 10:33
29 мая 2026 18:20
29 мая 2026 16:17