diff --git a/python/README-zh.md b/python/README-zh.md index 7bb751a..06c54d1 100644 --- a/python/README-zh.md +++ b/python/README-zh.md @@ -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 @@ -60,4 +60,4 @@ result = {'name': 'crawlab'} save_item(result) ``` -然后,启动爬虫,运行完成之后,您就应该能看到抓取结果出现在 [任务详情-结果](../Task/View.md) 里。 \ No newline at end of file +然后,启动爬虫,运行完成之后,您就应该能看到抓取结果出现在 [任务详情-结果](../Task/View.md) 里。 diff --git a/python/README.md b/python/README.md index 3aff8bd..5dc9213 100644 --- a/python/README.md +++ b/python/README.md @@ -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 diff --git a/python/crawlab/core/__init__.py b/python/crawlab/core/__init__.py index 974fd8b..cd8d3de 100644 --- a/python/crawlab/core/__init__.py +++ b/python/crawlab/core/__init__.py @@ -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):