
    cf                     P    d dl Z d dlZd dlmZ d dlmZmZ ddlmZ d Z	d Z
d ZdS )	    N)Bar)	timedeltadatetime   )corec                 F    |D ]}| d         |d         d         k    r dS dS )NidaccountFT )r
   mentionsmentions      h/home/feoh/.local/pipx/venvs/mastodon-archive/lib/python3.11/site-packages/mastodon_archive/followers.py	is_lurkerr      s;      4=GI.t44455 54    c                 $    fd| D             S )Nc                 H    g | ]}|d          vt          |          |S )acct)r   ).0xr   	whitelists     r   
<listcomp>z find_lurkers.<locals>.<listcomp>   sC     ( ( (!y	))!X&& * )))r   r   )	followersr   r   s    ``r   find_lurkersr      s3    ( ( ( ( (y ( ( ( (r   c                    | j                             d          \  }}|dz   |z   dz   }t          j        |ddd          }d}| j        rd|vst          |d                   dk    rt          dt          j        	           d
}d|vst          |d                   dk    rt          dt          j        	           d}|dk    rt          j	        |           | j        sXt          |d         d           D ]+}t          |d         p|d         d|d         d           ,t          j	        d           | j        r| j        st          d           |d         }nN| j        s't          dt          | j                  z   dz              t          j        |d         | j                  }t          j        ||          }| j        rAt          j        |           }	t'          |d         ||          }
| j        st)          dt          |
                    }|
D ]}| j        s|                                 	 |	                    |d                    :# t.          $ r}dt          |          v rSt          d           t          j        |            t          j        |           }	|	                    |d                    nt          |t          j        	           Y d}~d}~ww xY w| j        s|                                 dS dS t'          |d         ||          }
t          |
d           D ]+}t          |d         p|d         d|d         d           ,dS )z
    List followers
    @z.user.z.jsonT)requiredquietcombiner   r   z:You need to run 'mastodon-archive archive --with-mentions')file   r   z;You need to run 'mastodon-archive archive --with-followers'   c                 "    | d         p| d         S Ndisplay_nameusernamer   r
   s    r   <lambda>zfollowers.<locals>.<lambda>:       %n5L9L r   )keyr$   r%   z <r   >zConsidering the entire archivezConsidering the last z weeksBlocking)maxr	   zauthorized scopesz>
We need to authorize the app to make changes to your account.Nc                 "    | d         p| d         S r#   r   r&   s    r   r'   zfollowers.<locals>.<lambda>h   r(   r   )usersplitr   loadr   lenprintsysstderrexitsortedallr   strweekskeepr   block	readwriter   r   nextaccount_block	Exceptiondeauthorizefinish)argsr%   domainstatus_filedataerrorr
   r   r   mastodonaccountsbares                r   r   r   !   s   
 --Xv8#h.8K9[4tTJJJD E} 4//3tJ7G3H3HA3M3MJ:	 	 	 	$#d;&7"8"8A"="=K:	 	 	 	qyy = d;/ 6M 6M N N N 	1 	1Gw~6M'*:MMM&v0 1 1 1 1x 	;z 	42333
#z 	)
OO$    9T*-tz::vx00Iz 1>$''[ 19hGGz 	7jH666C 	. 	.G: 



.&&wt}5555 . . .&#a&&00[\\\$T***#~d33H**74=9999!#*----. z 	JJLLLLL	 	  [ 19hGGh -M -M N N N 	1 	1Gw~6M'*:MMM&v0 1 1 1 1	1 	1s   8I
K'A?K""K')r3   os.pathosprogress.barr   r   r    r   r   r   r   r   r   r   <module>rO      s     


        ( ( ( ( ( ( ( (        ( ( (
J1 J1 J1 J1 J1r   