Skip to content

Commit

Permalink
2023-11-22 修复正则错误
Browse files Browse the repository at this point in the history
  • Loading branch information
Barry-Flynn committed Nov 22, 2023
1 parent 2af2174 commit bcb3dad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def getdata(name):
datadatereg = re.compile(r'data-date="(.*?)" data-level')

# 针对2023-11-19更新了正则,并按字典序排序 https://github.com/Zfour/python_github_calendar_api/issues/18
datacountreg = re.compile(r'<tool-tip .*?class="sr-only position-absolute">(.*?) contributions')
datacountreg = re.compile(r'<tool-tip .*?class="sr-only position-absolute">(.*?) contribution')
datadate = datadatereg.findall(data)
datacount = datacountreg.findall(data)
datacount = list(map(int, [0 if i == "No" else i for i in datacount]))
Expand Down

1 comment on commit bcb3dad

@vercel
Copy link

@vercel vercel bot commented on bcb3dad Nov 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.