Skip to content

Commit

Permalink
update version.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brethland committed Aug 12, 2019
1 parent f57c39f commit 6939220
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions Submitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Illuminate\Support\Facades\Validator;
use Requests;
use Log;
use Exception;

class Submitter extends Curl
{
Expand Down Expand Up @@ -78,7 +79,9 @@ private function _submit()
$this->sub['jid'] = $this->selectedJudger['jid'];
$res = Requests::get('http://acm.hdu.edu.cn/status.php?user='.$this->selectedJudger['handle'].'&pid='.$this->post_data['iid']);
if (!preg_match("/<td height=22px>([\s\S]*?)<\/td>/", $res->body, $match)) {
$this->sub['verdict']='Submission Error';
sleep(1);
throw new \Exception("Submission error");
// $this->sub['verdict']='Submission Error';
} else {
$this->sub['remote_id']=$match[1];
}
Expand Down Expand Up @@ -210,10 +213,12 @@ private function contestSubmit() {
]);
$this->sub['jid'] = $this->selectedJudger['jid'];
$this->sub['vcid'] = $vcid;
sleep(4);
$res = $this->__loginAndGet("http://acm.hdu.edu.cn/contests/contest_status.php?cid={$vcid}&user=".$this->selectedJudger['handle'].'&pid='.$this->post_data['iid']);
if (!preg_match('/<td height=22>([\s\S]*?)<\/td>/', $res, $match)) {
sleep(7);
$this->sub['verdict']='Submission Error';
sleep(1);
throw new \Exception("Submission error");
// $this->sub['verdict']='Submission Error';
} else {
$this->sub['remote_id']=$match[1];
}
Expand Down
2 changes: 1 addition & 1 deletion babel.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"description": "HDU Interface for NOJ",
"license": "MIT",
"repository":"https://github.com/NJUPTAAA/NOJ_Extension_HDU",
"version":"0.3.19",
"version":"0.3.20",
"website":"http://acm.hdu.edu.cn/",
"custom":{
"css":"resources/custom.css"
Expand Down

0 comments on commit 6939220

Please sign in to comment.