Skip to content

Commit

Permalink
update version.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brethland committed Jul 24, 2019
1 parent f946476 commit 6c5c845
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Judger.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ private function _login($handle, $pass, $vcid)
}

private function grab($all_data) {
$oj = $all_data['oj'];
$handle = $all_data['handle'];
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $all_data['site']);
Expand All @@ -63,8 +65,8 @@ private function grab($all_data) {


$headers = array();
curl_setopt($ch, CURLOPT_COOKIEFILE, babel_path("Cookies/hdu_team0670.cookie"));
curl_setopt($ch, CURLOPT_COOKIEJAR, babel_path("Cookies/hdu_team0670.cookie"));
curl_setopt($ch, CURLOPT_COOKIEFILE, babel_path("Cookies/{$oj}_{$handle}.cookie"));
curl_setopt($ch, CURLOPT_COOKIEJAR, babel_path("Cookies/{$oj}_{$handle}.cookie"));

$result = curl_exec($ch);
curl_close($ch);
Expand Down Expand Up @@ -111,6 +113,7 @@ public function judge($row)
$pass = $judger['password'];
$this->_login($handle, $pass, $row['vcid']);
$response = $this->_loginAndGet("http://acm.hdu.edu.cn/contests/contest_status.php?cid=".$row['vcid']."&user=".$handle."&pid=".$iid, $handle, $pass, $row['vcid']);
Log::debug($response);
}
if(isset($row['vcid'])) {
$hduRes = HTMLDomParser::str_get_html($response, true, true, DEFAULT_TARGET_CHARSET, false);
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.8",
"version":"0.3.9",
"website":"http://acm.hdu.edu.cn/",
"custom":{
"css":"resources/custom.css"
Expand Down

0 comments on commit 6c5c845

Please sign in to comment.