File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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):
3333class 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' , '*' )
You can’t perform that action at this time.
0 commit comments