@@ -32,12 +32,18 @@ class Profile(object):
3232 # -------------------------------------------------------------------------
3333 def __init__ (self , handle = "" ):
3434 """
35- @param handle (String): Spoj handle
35+ @param handle (String): AtCoder handle
3636 """
3737
3838 self .site = Profile .site_name
3939 self .handle = handle
4040
41+ # -------------------------------------------------------------------------
42+ @staticmethod
43+ def is_valid_url (url ):
44+ return url .__contains__ ("kenkoooo.com/" ) or \
45+ url .__contains__ ("atcoder.jp/" )
46+
4147 # -------------------------------------------------------------------------
4248 @staticmethod
4349 def is_website_down ():
@@ -74,8 +80,6 @@ def get_problem_setters():
7480 def get_editorial_link (problem_link ):
7581 """
7682 """
77- # @Todo fill this
78-
7983 try :
8084 contest_id = re .search ("contests/.*/tasks" ,
8185 problem_link ).group ().split ("/" )[1 ]
@@ -118,7 +122,7 @@ def is_invalid_handle(handle):
118122 # -------------------------------------------------------------------------
119123 @staticmethod
120124 def rating_graph_data (handle ):
121- url = "https://atcoder.jp/users/ %s/history" % handle
125+ url = "%susers/ %s/history" % ( current . SITES [ "AtCoder" ], handle )
122126
123127 response = get_request (url )
124128 if response in REQUEST_FAILURES :
@@ -151,7 +155,7 @@ def rating_graph_data(handle):
151155 def get_submissions (self , last_retrieved ,
152156 atcoder_problem_dict , is_daily_retrieval ):
153157 """
154- Retrieve Spoj submissions after last retrieved timestamp
158+ Retrieve AtCoder submissions after last retrieved timestamp
155159
156160 @param last_retrieved (DateTime): Last retrieved timestamp for the user
157161 @param atcoder_problem_dict (Dict): Problem ID to name mapping
0 commit comments