Skip to content

Commit

Permalink
fixed crawler file system bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
ZsgsDesign committed Jul 26, 2021
1 parent 9a28742 commit 2ee5e96
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Crawler.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use KubAT\PhpSimple\HtmlDomParser;
use Requests;
use Exception;
use Storage;

class Crawler extends CrawlerBase
{
Expand Down Expand Up @@ -115,6 +116,7 @@ private function _crawl($con, $info)
$this->line("\n <bg=red;fg=white> Exception </> : <fg=yellow>Problem's PDF not found.</>\n");
return;
}
Storage::disk('NOJPublic')->makeDirectory("external/gym/");
file_put_contents(base_path("public/external/gym/UVaL$con.pdf"), $res->body);
} catch (Exception $e) {
$this->line("\n <bg=red;fg=white> Exception </> : <fg=yellow>Failed while downloading PDF.</>\n");
Expand Down
4 changes: 2 additions & 2 deletions babel.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"description": "UVaLive interface for NOJ",
"license": "MIT",
"repository":"https://github.com/NJUPTAAA/NOJ_Extension_UVaLive",
"version":"0.1.4",
"version":"0.2.0",
"website":"https://icpcarchive.ecs.baylor.edu/",
"provider":{
"judger":"Judger",
Expand All @@ -15,6 +15,6 @@
"installer":"Installer"
},
"require":{
"NOJ":"0.3.2"
"NOJ":"^0.3.2"
}
}

0 comments on commit 2ee5e96

Please sign in to comment.