Skip to content

Commit 8e97102

Browse files
authored
Update index.py
1 parent 04bdc59 commit 8e97102

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

api/index.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def getdata(name):
1010
gitpage = requests.get("https://github.com/" + name)
1111
data = gitpage.text
1212
datadatereg = re.compile(r'data-date="(.*?)" id="contribution-day-component')
13-
datacountreg = re.compile(r'<tool-tip .*?class="sr-only position-absolute">(.*?) contribution')
13+
datacountreg = re.compile(r'position-absolute">(.*?) contribution')
1414
datadate = datadatereg.findall(data)
1515
datacount = datacountreg.findall(data)
1616
datacount = list(map(int, [0 if i == "No" else i for i in datacount]))
@@ -33,7 +33,7 @@ def getdata(name):
3333
class handler(BaseHTTPRequestHandler):
3434
def do_GET(self):
3535
path = self.path
36-
user = path.split('?')[1]
36+
user = path.split('?')[1][:-1]
3737
data = getdata(user)
3838
self.send_response(200)
3939
self.send_header('Access-Control-Allow-Origin', '*')

0 commit comments

Comments
 (0)