Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated os environ #1

Merged
merged 2 commits into from
Mar 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pip install crawlab-sdk
然后,您就可以用 `crawlab` 这个命令在命令行中与 Crawlab 交互了。

可以利用下方命令来查找帮助,或者您可以参考
[官方文档](http://docs.crawlab.cn/Usage/Spider/CLI.html)。
[官方文档](https://docs.crawlab.cn/SDK/CLI.html)。

```
crawlab --help
Expand Down Expand Up @@ -60,4 +60,4 @@ result = {'name': 'crawlab'}
save_item(result)
```

然后,启动爬虫,运行完成之后,您就应该能看到抓取结果出现在 [任务详情-结果](../Task/View.md) 里。
然后,启动爬虫,运行完成之后,您就应该能看到抓取结果出现在 [任务详情-结果](../Task/View.md) 里。
2 changes: 1 addition & 1 deletion python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pip install crawlab-sdk

Then, you can use the `crawlab` command in the command prompt to action with Crawlab.

Check the help document below, or you can refer to [the official documentation (Chinese)](http://docs.crawlab.cn/Usage/Spider/CLI.html).
Check the help document below, or you can refer to [the official documentation (Chinese)](https://docs.crawlab.cn/SDK/CLI.html).

```
crawlab --help
Expand Down
7 changes: 6 additions & 1 deletion python/crawlab/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import os

CRAWLAB_ROOT = os.path.join(os.environ.get('HOME'), '.crawlab')
if os.name == 'nt':
home = os.environ.get('HOMEPATH')
else:
home = os.environ.get('HOME')

CRAWLAB_ROOT = os.path.join(home, '.crawlab')
CRAWLAB_TMP = os.path.join(CRAWLAB_ROOT, 'tmp')

if not os.path.exists(CRAWLAB_ROOT):
Expand Down