Ë
    ûûàg  ã                   óZ   — d dl mZ d dlmZ d dlmZ  G d„ de«      Z G d„ de«      ZegZy)	é    )ÚProviderAccount)ÚDoubanOAuth2Adapter)ÚOAuth2Providerc                   ó   — e Zd Zd„ Zd„ Zy)ÚDoubanAccountc                 óL   — | j                   j                  j                  d«      S )NÚalt©ÚaccountÚ
extra_dataÚget©Úselfs    úm/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/allauth/socialaccount/providers/douban/provider.pyÚget_profile_urlzDoubanAccount.get_profile_url   s   € Ø�|‰|×&Ñ&×*Ñ*¨5Ó1Ð1ó    c                 óL   — | j                   j                  j                  d«      S )NÚlarge_avatarr
   r   s    r   Úget_avatar_urlzDoubanAccount.get_avatar_url
   s   € Ø�|‰|×&Ñ&×*Ñ*¨>Ó:Ð:r   N)Ú__name__Ú
__module__Ú__qualname__r   r   © r   r   r   r      s   „ ò2ó;r   r   c                   ó(   — e Zd ZdZdZeZeZd„ Z	d„ Z
y)ÚDoubanProviderÚdoubanÚDoubanc                 ó   — |d   S )NÚidr   ©r   Údatas     r   Úextract_uidzDoubanProvider.extract_uid   s   € Ø�D‰zÐr   c                 ó2   — |d   |j                  dd«      dœS )a½  
        Extract data from profile json to populate user instance.

        In Douban profile API:

        - id: a digital string, will never change
        - uid: defaults to id, but can be changed once, used in profile
          url, like slug
        - name: display name, can be changed every 30 days

        So we should use `id` as username here, other than `uid`.
        Also use `name` as `first_name` for displaying purpose.
        r   ÚnameÚ )ÚusernameÚ
first_name)r   r    s     r   Úextract_common_fieldsz$DoubanProvider.extract_common_fields   s#   € ð ˜T™
ØŸ(™( 6¨2Ó.ñ
ð 	
r   N)r   r   r   r   r$   r   Úaccount_classr   Úoauth2_adapter_classr"   r(   r   r   r   r   r      s!   „ Ø	€BØ€DØ!€MØ.Ðòó
r   r   N)	Ú$allauth.socialaccount.providers.baser   Ú,allauth.socialaccount.providers.douban.viewsr   Ú/allauth.socialaccount.providers.oauth2.providerr   r   r   Úprovider_classesr   r   r   ú<module>r/      s1   ðÝ @Ý LÝ Jô;�Oô ;ô
�^ô 
ð: #Ð#Ñ r   