
    ii                     N    S SK Jr  S SKJr  SSKJr  \" \5      r " S S\5      rg)    )	HttpError)	getLogger   )GoogleDriveHelperc                   .   ^  \ rS rSrU 4S jrS rSrU =r$ )GoogleDriveDelete	   c                 "   > [         TU ]  5         g )N)super__init__)self	__class__s    9/app/bot/helper/mirror_leech_utils/gdrive_utils/delete.pyr   GoogleDriveDelete.__init__
   s        c                     U R                  X5      nU R                  5       U l        Sn U R                  R                  5       R                  USS9R                  5         Sn[        R                  SU 35        U$ ! [        [        4 a     gf = f! [         a  nS[        U5      ;   d  S[        U5      ;   a]  U R                  (       dJ  U R                  (       a9  SU l        S	U l        [        R                  S
5        U R                  X5      s S nA$ Sn[        R                  SU 35        [        U5      n S nAU$ S nAff = f)Nz7Google Drive ID could not be found in the provided link T)fileIdsupportsAllDriveszSuccessfully deletedzDelete Result: zFile not foundinsufficientFilePermissionsFz+File not found. Trying with token.pickle...z.File not found or insufficientFilePermissions!)get_id_from_urlKeyError
IndexError	authorizeservicefilesdeleteexecuteLOGGERinfor   stralt_authuse_saerror
deletefile)r   linkuser_idfile_idmsgerrs         r   r%   GoogleDriveDelete.deletefile   s(   	M**49G ~~'	LL ''$ ( gi(CKK/#/0 
- *% 	ML	M  	3s8+/LPSQ 0 }}$(DM"'DKLL!NO??499FLL?3%01c(C
	s6   A= AB =BB
EA3EE%EE)r"   r   r#   )__name__
__module____qualname____firstlineno__r   r%   __static_attributes____classcell__)r   s   @r   r   r   	   s     r   r   N)	googleapiclient.errorsr   loggingr   -helper.mirror_leech_utils.gdrive_utils.helperr   r,   r   r    r   r   <module>r6      s%    ,  O	8	) r   