Skip to content

Commit

Permalink
fix pipix not found error
Browse files Browse the repository at this point in the history
  • Loading branch information
moyada committed Apr 19, 2020
1 parent 6e083e0 commit 5524c6e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ pip3 install enum
pip3 install json
```

下载解压完运行 `start.sh``run.sh`,通过浏览器打开 `localhost:8000` 进入使用页面。
下载解压完运行 `start.sh``run.sh`,通过浏览器打开 [localhost:8000](http://localhost:8000) 进入使用页面。

[试用地址](http://119.23.110.20:8000/)

> 小破服务器,每天试用 3
> 小破服务器,每天试用 5
6 changes: 5 additions & 1 deletion service/pipixia.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ def fetch(cls, url: str, model=0) -> Result:
if http_utils.is_error(res):
return Result.error(res)

id = re.findall(r"(?<=item\/)(\d+)(?=\?)", res.url)[0]
try:
id = re.findall(r"(?<=item\/)(\d+)(?=\?)", res.url)[0]
except KeyError:
return Result.failed(res.text)

url = "https://h5.pipix.com/bds/webapi/item/detail/?item_id=" + id + "&source=share"

info_res = http_utils.get(url, header=share_headers)
Expand Down

0 comments on commit 5524c6e

Please sign in to comment.