File tree Expand file tree Collapse file tree 2 files changed +5
-15
lines changed
Expand file tree Collapse file tree 2 files changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -220,20 +220,10 @@ impl ChatContext {
220220 None => "2.20240207.07.00" . to_string ( )
221221 } ;
222222
223- static LIVE_CONTINUATION_REGEX : OnceLock < Regex > = OnceLock :: new ( ) ;
224- static REPLAY_CONTINUATION_REGEX : OnceLock < Regex > = OnceLock :: new ( ) ;
225- let continuation_regex = if live_status. updates_live ( ) {
226- LIVE_CONTINUATION_REGEX . get_or_init ( || Regex :: new (
227- r#"Live chat['"],\s*['"]selected['"]:\s*(?:true|false),\s*['"]continuation['"]:\s*\{\s*['"]reloadContinuationData['"]:\s*\{['"]continuation['"]:\s*['"](.+?)['"]"#
228- ) . unwrap ( ) )
229- } else {
230- REPLAY_CONTINUATION_REGEX . get_or_init ( || {
231- Regex :: new (
232- r#"Top chat replay['"],\s*['"]selected['"]:\s*true,\s*['"]continuation['"]:\s*\{\s*['"]reloadContinuationData['"]:\s*\{['"]continuation['"]:\s*['"](.+?)['"]"#
233- )
234- . unwrap ( )
235- } )
236- } ;
223+ static CONTINUATION_REGEX : OnceLock < Regex > = OnceLock :: new ( ) ;
224+ let continuation_regex = CONTINUATION_REGEX . get_or_init ( || {
225+ Regex :: new ( r#"['"]continuations['"]:\s*\[\{\s*['"]reloadContinuationData['"]:\s*\{['"]continuation['"]:\s*['"](.+?)['"]"# ) . unwrap ( )
226+ } ) ;
237227 let continuation = match continuation_regex. captures ( & page_contents) . and_then ( |captures| captures. get ( 1 ) ) {
238228 Some ( matched) => matched. as_str ( ) . to_string ( ) ,
239229 None => return Err ( Error :: NoChatContinuation )
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ impl GetLiveChatResponse {
6868 Ok ( get_http_client ( )
6969 . post ( Url :: parse_with_params (
7070 if options. live_status . updates_live ( ) { TANGO_LIVE_ENDPOINT } else { TANGO_REPLAY_ENDPOINT } ,
71- [ ( "key" , options . api_key . as_str ( ) ) , ( " prettyPrint", "false" ) ]
71+ [ ( "prettyPrint" , "false" ) ]
7272 ) ?)
7373 . simd_json ( & body) ?
7474 . send ( )
You can’t perform that action at this time.
0 commit comments