
    V|hB                     >    S SK Jr  SSKJrJrJrJr   " S S\5      rg)   )InfoExtractor   )ExtractorErrorint_or_nonetry_getunified_timestampc                   B    \ rS rSrSrSrSrSSS.SSS.S	SS./rS
 rSr	g)CiscoWebexIE
   
ciscowebexzCisco WebexaU  (?x)
                    (?P<url>https?://(?P<subdomain>[^/#?]*)\.webex\.com/(?:
                        (?P<siteurl_1>[^/#?]*)/(?:ldr|lsr).php\?(?:[^#]*&)*RCID=(?P<rcid>[0-9a-f]{32})|
                        (?:recordingservice|webappng)/sites/(?P<siteurl_2>[^/#?]*)/recording/(?:playback/|play/)?(?P<id>[0-9a-f]{32})
                    ))zYhttps://demosubdomain.webex.com/demositeurl/ldr.php?RCID=e58e803bc0f766bb5f6376d2e86adb5bT)urlonly_matchingzXhttp://demosubdomain.webex.com/demositeurl/lsr.php?RCID=bc04b4a7b5ea2cc3a493d5ae6aaff5d7zvhttps://demosubdomain.webex.com/recordingservice/sites/demositeurl/recording/88e7a42f7b19f5b423c54754aecc2ce9/playbackc                    U R                  U5      nUR                  S5      nU(       a-  U R                  US SS9nU R                  U R                  USSS9nU R                  US SS9R                  nU R                  U5      nUR                  S5      nUR                  S	5      =(       d    UR                  S
5      nUR                  S5      nU R                  S5      nSS0n	U(       a  XS'   U R                  SU SU S3XySU0SS9u  pUR                  S:X  a_  U
S   S:X  a  U R                  5         U
S   S:X  a  U(       a
  [        SSS9e[        SSS9e[        U R                   SU
S    SU
S     3SS9eUR                  S!:X  a  U R                  U R                   S"3S#S$9  U
R                  S%5      =(       d    UnS&U
S'   S(S)S*S+./nU
R                  S,5      S-L aV  [        U
S. 5      nU(       a  UR                  S&US(S)S*S+.5        [        U
S/ 5      nU(       a  UR                  S0US1S2S1S+.5        UU
S3   U
R                  S45      U
R                  S55      U
R                  S65      =(       d    U
R                  S75      [!        U
R                  S85      5      [#        U
R                  S95      S:5      SU S;U S<U 3US=.	$ )>NrcidzGetting video ID)notezredirection urlr   )groupzResolving final URL	subdomain	siteurl_1	siteurl_2idvideopasswordAcceptzapplication/json	accessPwdzhttps://z&.webex.com/webappng/api/v1/recordings/z/streamsiteurl)    )headersqueryexpected_statusr   codei  i  zWrong passwordT)expectedzFThis video is protected by a password, use the --video-password optionz said: z - messager   z: asks you to solve a CAPTCHA. Solve CAPTCHA in browser andcookies)method
recordUUIDvideofallbackPlaySrcmp4zavc1.640028z	mp4a.40.2)	format_idr   extvcodecacodecpreventDownloadFc                     U S   S   S   $ )NdownloadRecordingInfodownloadInfomp4URL xs    U/home/james-whalen/.local/lib/python3.13/site-packages/yt_dlp/extractor/ciscowebex.py<lambda>,CiscoWebexIE._real_extract.<locals>.<lambda>M   s    q1H/I./YZb/c    c                     U S   S   S   $ )Nr/   r0   audioURLr2   r3   s    r5   r6   r7   V   s    3J1KN1[\f1gr8   audiomp3none
recordNamedescriptionownerDisplayNameownerUserNameownerId
createTimedurationi  z".webex.com/recordingservice/sites/z/recording/playback/)	r   titler?   uploaderuploader_id	timestamprD   webpage_urlformats)_match_valid_urlr   _download_webpage_search_regex
_VALID_URL_request_webpager   	get_param_download_json_handlestatusraise_login_requiredr   IE_NAMEgetr   appendr   r   )selfr   mobjr   webpager   r   video_idpasswordr   streamurlhrJ   mp4urlaudiourls                  r5   _real_extractCiscoWebexIE._real_extract   s   $$S)zz&!,,S$=O,PG$$T__g?PX]$^C##C4I#JNN$$S)JJ{+	**[)DTZZ-D::d#>>/2/0#+K 11yk!GzQXYi-AS] 2 _ ;;#f~&))+f~&()9DII$\gkm m DLL>8HFS\L]K^!_jnoo;;#%%<<. Z[  & " ::l+7x !+,#!
  ::'(E1V%cdF!(! +)   v'ghH!(# $#   L)!::m4

#56!::o6O&**Y:O*6::l+CD#FJJz$:DA%i[0RSZR[[opxoyz

 
	
r8   r2   N)
__name__
__module____qualname____firstlineno__rT   IE_DESCrN   _TESTSr`   __static_attributes__r2   r8   r5   r
   r
   
   sJ    GGJ k j H	FL
r8   r
   N)commonr   utilsr   r   r   r   r
   r2   r8   r5   <module>rk      s     ! `
= `
r8   