@@ -14,6 +14,10 @@
__author__ = 'JHao'
from flask import Flask, jsonify, request
+import sys
+
+sys.path.append('../')
from Manager.ProxyManager import ProxyManager
app = Flask(__name__)
@@ -101,10 +101,10 @@ pip install -r requirements.txt
到Config.ini中配置你的SSDB
项目目录下:
->>>python ProxyRefreshSchedule.py
+>>>python -m Schedule.ProxyRefreshSchedule
到Api目录下:
->>>python ProxyApi.py
+>>>python -m Api.ProxyApi
```
### 5、使用
@@ -17,6 +17,9 @@ from apscheduler.schedulers.blocking import BlockingScheduler
from multiprocessing import Process
import requests
import time
@@ -25,7 +25,7 @@ class GetConfig(object):
def __init__(self):
self.pwd = os.path.split(os.path.realpath(__file__))[0]
- self.config_path = os.path.join(os.path.split(self.pwd)[0], 'config.ini')
+ self.config_path = os.path.join(os.path.split(self.pwd)[0], 'Config.ini')
self.config_file = ConfigParse()
self.config_file.read(self.config_path)