@@ -176,8 +176,8 @@ async def login(self, force=False):
176176 if req .status_code == 302 :
177177 if req .cookies .get ("logged_in" ) == "yes" :
178178 self .session = {
179- "user_session" : self . _as_client .cookies ["user_session" ],
180- "__Host-user_session_same_site" : self . _as_client .cookies ["__Host-user_session_same_site" ],
179+ "user_session" : req .cookies ["user_session" ],
180+ "__Host-user_session_same_site" : req .cookies ["__Host-user_session_same_site" ],
181181 "_device_id" : self ._as_client .cookies ["_device_id" ]
182182 }
183183 self .save_creds ()
@@ -205,8 +205,8 @@ async def login(self, force=False):
205205 req = await self ._as_client .post ("https://github.com/sessions/verified-device" , data = data )
206206 if req .cookies .get ("logged_in" ) == "yes" :
207207 self .session = {
208- "user_session" : self . _as_client .cookies ["user_session" ],
209- "__Host-user_session_same_site" : self . _as_client .cookies ["__Host-user_session_same_site" ],
208+ "user_session" : req .cookies ["user_session" ],
209+ "__Host-user_session_same_site" : req .cookies ["__Host-user_session_same_site" ],
210210 "_device_id" : self ._as_client .cookies ["_device_id" ]
211211 }
212212 self .save_creds ()
@@ -256,8 +256,8 @@ async def login(self, force=False):
256256 print ("[+] Got confirmation !" )
257257
258258 self .session = {
259- "user_session" : self . _as_client .cookies ["user_session" ],
260- "__Host-user_session_same_site" : self . _as_client .cookies ["__Host-user_session_same_site" ],
259+ "user_session" : req .cookies ["user_session" ],
260+ "__Host-user_session_same_site" : req .cookies ["__Host-user_session_same_site" ],
261261 "_device_id" : self ._as_client .cookies ["_device_id" ]
262262 }
263263 self .save_creds ()
@@ -284,8 +284,8 @@ async def login(self, force=False):
284284 req = await self ._as_client .post ("https://github.com/sessions/two-factor" , data = data )
285285 if req .cookies .get ("logged_in" ) == "yes" :
286286 self .session = {
287- "user_session" : self . _as_client .cookies ["user_session" ],
288- "__Host-user_session_same_site" : self . _as_client .cookies ["__Host-user_session_same_site" ],
287+ "user_session" : req .cookies ["user_session" ],
288+ "__Host-user_session_same_site" : req .cookies ["__Host-user_session_same_site" ],
289289 "_device_id" : self ._as_client .cookies ["_device_id" ]
290290 }
291291 self .save_creds ()
@@ -347,6 +347,7 @@ def __init__(self):
347347 self .updated_at : datetime = None
348348 self .avatar_url = ""
349349 self .is_default_avatar = True
350+ self .nb_ext_contribs = 0
350351
351352 self .potential_friends : Dict [str , Dict [str , int | bool ]] = {}
352353 self .repos : List [Dict [str , any ]] = []
@@ -360,6 +361,7 @@ def __init__(self):
360361 self .ssh_keys : List [str ] = []
361362
362363 self .all_contribs : Dict [str , Dict [str , Dict [str , Dict [str , Set [str ]]]]] = {}
364+ self .ext_contribs : Dict [str , Dict [str , Dict [str , Dict [str , Set [str ]]]]] = {}
363365 self .internal_contribs : Dict [str , Dict [str , Dict [str , Dict [str , Dict [str , Set [str ]]]]]] = {"all" : {}, "no_github" : {}}
364366 self .usernames_history : Dict [str , Dict [str , Dict [str , Dict [str , Set [str ]]]]] = {}
365367 self .near_names : Dict [str , Dict [str , Dict [str , Dict [str , Dict [str , Dict [str , Set [str ]]]]]]] = {}
@@ -433,7 +435,7 @@ def __init__(self):
433435 "social_follows" : trio .CapacityLimiter (50 ),
434436 "repos_list" : trio .CapacityLimiter (50 ),
435437 "commits_scrape" : trio .CapacityLimiter (50 ),
436- "commits_fetch_avatar" : trio .CapacityLimiter (4 ),
438+ "commits_fetch_avatar" : trio .CapacityLimiter (1 ), # https://github.com/mxrch/GitFive/issues/3#issuecomment-1321260050
437439 "orgs_list" : trio .CapacityLimiter (50 )
438440 }
439441
0 commit comments