
    )JfW                     `    d dl mZmZ d dlmZ  G d de          Z G d de          ZegZdS )    )
AuthActionProviderAccount)OAuthProviderc                   0     e Zd Zd Zd Zd Z fdZ xZS )TwitterAccountc                 @    | j         j                            d          S )Nscreen_name)account
extra_dataget)selfs    s/home/alex/cs2snipeproduction/venv/lib/python3.11/site-packages/allauth/socialaccount/providers/twitter/provider.pyget_screen_namezTwitterAccount.get_screen_name   s    |&**=999    c                 @    d }|                                  }|rd|z   }|S )Nzhttp://twitter.com/)r   )r   retr	   s      r   get_profile_urlzTwitterAccount.get_profile_url	   s/    **,, 	6'+5C
r   c                 x    d }| j         j                            d          }|r|                    dd          }|S )Nprofile_image_url_normal )r
   r   r   replace)r   r   r   s      r   get_avatar_urlzTwitterAccount.get_avatar_url   sE     L3778KLL 	; $++Ir::C
r   c                 ~    |                                  }|p&t          t          |                                           S )N)r   superr   to_str)r   r	   	__class__s     r   r   zTwitterAccount.to_str   s5    **,,BeND99@@BBBr   )__name__
__module____qualname__r   r   r   r   __classcell__)r   s   @r   r   r      sn        : : :    C C C C C C C C Cr   r   c                   ,    e Zd ZdZdZeZd Zd Zd Z	dS )TwitterProvidertwitterTwitterc                 0    |t           j        k    rd}nd}|S )Nz'https://api.twitter.com/oauth/authorizez*https://api.twitter.com/oauth/authenticate)r   REAUTHENTICATE)r   requestactionurls       r   get_auth_urlzTwitterProvider.get_auth_url#   s!    Z...;CC>C
r   c                 ,    t          |d                   S )Nid)strr   datas     r   extract_uidzTwitterProvider.extract_uid*   s    4:r   c                     t          |                    d          |                    d          |                    d                    S )Nr	   nameemail)usernamer3   r4   )dictr   r/   s     r   extract_common_fieldsz%TwitterProvider.extract_common_fields-   sF    XXm,,&!!((7##
 
 
 	
r   N)
r   r   r    r-   r3   r   account_classr+   r1   r7    r   r   r#   r#      sP        	BD"M    
 
 
 
 
r   r#   N)$allauth.socialaccount.providers.baser   r   .allauth.socialaccount.providers.oauth.providerr   r   r#   provider_classesr9   r   r   <module>r=      s    L L L L L L L L H H H H H HC C C C C_ C C C2
 
 
 
 
m 
 
 
. $$   r   