mirror of
https://github.com/leon-ai/leon.git
synced 2024-12-01 03:15:58 +03:00
fix(package/trend): when there is no contributor on GitHub module
This commit is contained in:
parent
3b15b8028c
commit
d845e49b0f
@ -62,7 +62,10 @@ def github(string, entities):
|
||||
|
||||
for i, element in enumerate(elements):
|
||||
repository = element.h3.get_text(strip=True).replace(' ', '')
|
||||
author = element.img.get('alt')[1:]
|
||||
if (element.img != None):
|
||||
author = element.img.get('alt')[1:]
|
||||
else:
|
||||
author = '?'
|
||||
stars = element.select('span.d-inline-block.float-sm-right')[0].get_text(strip=True).split(' ')[0]
|
||||
separators = [' ', ',', '.']
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user