Skip to content

Commit f9036b7

Browse files
author
Jalin
committed
Small bug fix
1 parent 7c153f0 commit f9036b7

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ docker run -d -v $(PWD)/config.toml:/code/config.toml -v pyproxy-data:/code/data
5858
# curl http://127.0.0.1:8080/get_ip
5959
{"ip":"213.6.45.18","port":"39252","http":"http://213.6.45.18:39252"}
6060
61-
# 支持过滤条件 https,如
62-
curl http://127.0.0.1:8080/get_ip?https=1
61+
# 支持过滤条件 https,rule
62+
curl http://127.0.0.1:8080/get_ip?https=1&rule=google
6363
```
6464

6565
### 从文件或 Url 中加载已存在的 IP 列表

src/app/ip_get.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ async def parse_site(self, session, site: SiteData, resp: SiteResponse):
225225
if not self._test_model:
226226
await self.save_parse_result(session, site, result)
227227
else:
228-
await self.show_result(session, site, result, resp=resp)
228+
await self.show_result(session, site, result, resp=resp)
229229
except Exception as e:
230230
Logger.error('[get] Parse error, message: %s' % str(e))
231231

src/app/ip_saver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ async def dump_to_file(self):
8080
file_name = 'ip_pool_%s.ip.txt' % datetime.now().strftime('%Y-%m-%d %H:%M:%S')
8181
with open(Config.DUMPED_DIR + file_name, 'w') as f:
8282
f.write('\n'.join(members))
83-
Logger.info('Dump %d ip to file %s' % (len(members, file_name)))
83+
Logger.info('Dump %d ip to file %s' % (len(members), file_name))
8484
return True
8585

8686
def get_delay_key(self, delay: float) -> str:

src/app/prometheus.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def get_data() -> str:
2727

2828
@classmethod
2929
def up_status(cls, key: str, val: int, group=''):
30+
label = ''
3031
if key.find(':'):
3132
label = key[key.rfind(':') + 1:]
3233
cls.IP_STATUS.labels(key=label, group=group).set(val)

0 commit comments

Comments
 (0)