AliRagab313's blog

By AliRagab313, history, 5 weeks ago, In English

$$$\textbf{Hello Codeforces Community,}$$$

I am Ali Ragab, and together with Almo3lem A.R.A Ramdan, we have been exploring the integration between VJudge and Codeforces. During our research, we read the documentation for the Codeforces API and found that there is no official access provided for actions like submitting problems directly to Codeforces through third-party platforms such as VJudge.

Does VJudge Scrape Data from Codeforces?

Is Codeforces trying to prevent this?

If you have any information about this, please share it with us.

  • Vote: I like it
  • +1
  • Vote: I do not like it

»
5 weeks ago, # |
  Vote: I like it -8 Vote: I do not like it

Auto comment: topic has been updated by AliRagab313 (previous revision, new revision, compare).

»
5 weeks ago, # |
Rev. 3   Vote: I like it +5 Vote: I do not like it

VJudge doesn't literally 'scrape' test data from Codeforces. Instead, it scrapes other things like statements and results, and submits your code to Codeforces like a normal person.

I found these from a past passage, don't know if it's still useful now:

对于 CF 的登录,需要从页面中拿到 CSRF token,还需要从页面 Cookies 中提取 39ce7 的神仙字段,然后计算出 _tta,作为 POST 的参数。很神仙,根本不懂这个 _tta 算出来有啥用。

CF 的提交仍然需要 CSRF token,但是不需要 _tta 了,然后提交语言需要参照列表里面的对应值填写,反正也是从页面爬。

For CF login, it is necessary to obtain the CSRF token from the page, extract the 39ce7 immortal field from the page cookies, and then calculate _tta as the POST parameter. Very immortal, I don't even understand the usefulness of calculating this _tta.

The submission of CF still requires CSRF token, but not _tta, and the submission language needs to be filled in according to the corresponding value in the list, anyway, it is also crawled from the page.

JESSIONID is just for confirm your account.

As for Codeforces itself, well Codeforces already had a Cloudflare. I don't know how VJudge dealt with this problem, anyway Luogu's RemoteJudge is still dead.