Skip to content

Commit

Permalink
Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
howie6879 committed Nov 1, 2024
1 parent d5c0bfb commit 2c1ebf2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/collector/dj_spider.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ def get_dj_data(kw: str, proxy_model: int = 0) -> str:
if __name__ == "__main__":
from pprint import pprint

res = get_dj_data(kw="机", proxy_model=1)
res = get_dj_data(kw="机", proxy_model=0)
pprint(res)
3 changes: 2 additions & 1 deletion src/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ class Config:
}
SOURCE_CONFIG = {
"kk": os.getenv(
"SOURCE_KK", "http://z.kkkob.com;http://s.kkkob.com;http://m.kkqws.com"
"SOURCE_KK",
"http://www.kkkob.com;http://m.kkkob.com;http://p.kkkob.com;http://qq.kkkob.com;http://r.kkkob.com;http://s.kkkob.com;http://x.kkkob.com;http://y.kkkob.com;http://z.kkkob.com;http://m.kkqws.com",
).split(";"),
}
CACHE_DATA = {}
Expand Down
3 changes: 1 addition & 2 deletions src/views/v1/search/get_dj.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
Changelog: all notable changes to this file will be documented
"""


from flask import current_app, request

from src.collector import dj_spider
Expand Down Expand Up @@ -91,7 +90,7 @@ def get_dj():
**{
ResponseField.DATA: {
"total": len(target_data),
"data": target_data,
"rows": target_data,
}
},
}
Expand Down
7 changes: 5 additions & 2 deletions src/views/v1/search/get_pansearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Description: 获取 pansearch 资源
Changelog: all notable changes to this file will be documented
"""

from flask import current_app, request

from src.collector import pansearch_spider
Expand Down Expand Up @@ -81,14 +82,16 @@ def get_pansearch():
)
else:
# 数据抓取失败
app_logger.error(f"数据抓取失败( pansearch 源,请考虑使用代理),kw: {kw}")
app_logger.error(
f"数据抓取失败( pansearch 源,请考虑使用代理),kw: {kw}"
)

result = {
**UniResponse.SUCCESS,
**{
ResponseField.DATA: {
"total": len(target_data),
"data": target_data,
"rows": target_data,
}
},
}
Expand Down

0 comments on commit 2c1ebf2

Please sign in to comment.