Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdarcool authored Mar 30, 2021
1 parent 56dfb55 commit 62f7f11
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions App/REPLAPI/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,16 @@ def replit_cycles(name = None):
return e
except:
exit("ERROR: Cannot find " + name + "'s cycles!")

def replit_langs(name = None):
def replit_langs(name = None, extra = None):
sun = 0
if name == None:
exit("ERROR: You didn't fill out the name parameter!")
else:
if (extra == None):
pass
else:
if (extra == "all"):
sun = 1
try:
link = requests.get('https://replit.com/data/profiles/' +name )
data = link.json()
Expand All @@ -114,6 +119,9 @@ def replit_langs(name = None):
stuff = stuff.replace("]", "")
stuff = stuff.replace(" ", "")
li = list(stuff.split(","))
if (sun == 1):
sun = 2
return li, sun
return (li)
except:
exit("ERROR: Cannot find " + name + "'s langs!")
Expand Down Expand Up @@ -175,4 +183,4 @@ def replit_comments(name = None):
return '\n'.join(all_text)
except:
exit("ERROR: Cannot find "+name+"'s comments!")
#print(replit_langs("Coder100"))
#print(replit_langs("Coder100"))

0 comments on commit 62f7f11

Please sign in to comment.