-
Notifications
You must be signed in to change notification settings - Fork 635
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
54 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 - | ||
|
||
# 这里需修改 config_name 为你的配置文件名称,如 | ||
config_name = "config.yaml" | ||
|
||
# 以脚本地址作为配置文件地址 | ||
import sys, os | ||
config_path = os.path.join(os.path.dirname(sys.argv[0]), config_name) | ||
|
||
try: | ||
import requests | ||
except: | ||
import pip | ||
pip.main(['install', 'requests']) | ||
|
||
try: | ||
import yaml | ||
except: | ||
import pip | ||
pip.main(['install', 'PyYAML']) | ||
|
||
if __name__ == "__main__": | ||
from bjguahao import Guahao | ||
guahao = Guahao(config_path) | ||
guahao.run() |