/ discordbot / GithubfetchBot / stractdata.py
swadhinbiswas doc · 3/3/2024
8d228a8
20 lines · 414 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

global alldata
alldata = {
   
}
class Safegitdata:
   def formatingdata(text):
    
    for item in text["items"]:
        listgit=f"'Name': {item['name']},
        'Owner': {item['owner']['login']}, 
        'Stars': {item['stargazers_count']}, 
        'Language': {item['language']}, 
        'Description': {item['description']}, 
        'Link': {item['html_url']}"
    
    alldata[item['name']]=listgit