Skip to content

Commit

Permalink
fixed danmaku error
Browse files Browse the repository at this point in the history
  • Loading branch information
zaxtyson committed Jan 14, 2021
1 parent 9e3b219 commit df990a8
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

## 更新日志

### `v1.2.0`
### `v1.1.8`

- 新增引擎 k1080p
- 修复 youku 某些弹幕解析失败的问题
Expand All @@ -50,7 +50,7 @@
- 界面、播放器、弹幕显示、快捷键等多处细节优化
- 程序主界面不再显示控制台

### `v1.1.8`
### `v1.0.0`

- 修复 agefans 无法访问的问题(被墙)
- 外挂弹幕支持
Expand Down
4 changes: 3 additions & 1 deletion api/danmaku/tencent.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from api.core.base import DanmakuEngine
from api.core.models import DanmakuCollection, DanmakuMetaInfo, Danmaku
from api.utils.logger import logger


class DanmakuTencent(DanmakuEngine):
Expand All @@ -12,7 +13,8 @@ class DanmakuTencent(DanmakuEngine):
def search(self, keyword: str):
"""搜索相关的电视剧/番剧"""
# 先通过接口搜索, 没有结果再解析网页数据
yield from self.search_from_api(keyword) or self.search_from_web(keyword)
logger.info(f"Searching for danmaku: {keyword}")
yield from (*self.search_from_api(keyword), *self.search_from_web(keyword))

def search_from_api(self, keyword: str) -> List[DanmakuMetaInfo]:
"""通过接口搜索同一系列的剧集"""
Expand Down
1 change: 1 addition & 0 deletions api/danmaku/youku.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class DanmukuYouku(DanmakuEngine):

def search(self, keyword: str) -> List[DanmakuMetaInfo]:
"""搜索视频"""
logger.info(f"Searching for danmaku: {keyword}")
search_api = "https://search.youku.com/search_video"
resp = self.get(search_api, params={"keyword": keyword})
if resp.status_code != 200:
Expand Down
8 changes: 5 additions & 3 deletions web/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,14 @@ It's just a simple Vue3.0 project. Easy to Modify & Build.

### Process

@2021-01-11 update 1.1.8
@2021-01-13 update 1.1.8-fixed
- √ 修复弹幕自动匹配失败后手动选择弹幕集按钮点击无效的问题和部分浏览器按钮排列乱序问题

@2021-01-11 update 1.2.0
- √ 增加搜素结果异步显示的支持,拒绝漫长等待,搜索更丝滑
- √ 完善历史记录,增强后端支持的详情页解析,历史播放更便捷
- √ 修复弹幕库未加载完立即(过早?)点击视频时自动弹幕匹配失败的问题
- √ 浏览器LocalStorage的历史记录的保存数量限制开放到32条最多,自动检测更新时间调整为8分钟
-[播放器组件]优化了播放器组件自动聚焦,播放组件一体化。调整样式。
- √ 历史记录的保存数量限制开放到32条最多

@2021-01-09 update 1.1.4
- √ 增加快捷键上一集`[`和下一集`]` 的事件接口
Expand Down
4 changes: 2 additions & 2 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
<link rel=stylesheet href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900">
<link rel=stylesheet href=https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css>
<link href=js/about.7bf2b6d7.js rel=prefetch>
<link href=js/app.5d39918f.js rel=preload as=script>
<link href=js/app.835476be.js rel=preload as=script>
<link href=js/chunk-vendors.7195d941.js rel=preload as=script>
</head>
<body>
<noscript><strong>We're sorry but AnimeSearcher doesn't work properly without JavaScript enabled. Please enable it to
continue.</strong></noscript>
<div id=app></div>
<script src=js/chunk-vendors.7195d941.js></script>
<script src=js/app.5d39918f.js></script>
<script src=js/app.835476be.js></script>
</body>
</html>
1 change: 0 additions & 1 deletion web/js/app.5d39918f.js

This file was deleted.

1 change: 1 addition & 0 deletions web/js/app.835476be.js

Large diffs are not rendered by default.

0 comments on commit df990a8

Please sign in to comment.