Skip to content

Commit f62da9e

Browse files
authored
Update index.py
1 parent cfd2f97 commit f62da9e

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
@@ -9,8 +9,8 @@ def list_split(items, n):
99
def getdata(name):
1010
gitpage = requests.get("https://github.com/" + name)
1111
data = gitpage.text
12-
datadatereg = re.compile(r'data-date="(.*?)" data-level')
13-
datacountreg = re.compile(r'<span class="sr-only">(.*?) contribution')
12+
datadatereg = re.compile(r'data-date="(.*?)" id="contribution-day-component"')
13+
datacountreg = re.compile(r'<tool-tip .*?class="sr-only 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]))

0 commit comments

Comments
 (0)