Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
# Conflicts:
#	result.log
#	result.txt
  • Loading branch information
Guovin committed Mar 21, 2024
2 parents ddbaaad + 1b01164 commit d25be05
Show file tree
Hide file tree
Showing 9 changed files with 1,609 additions and 1,308 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ name: 'update schedule'
on:
schedule:
- cron: '0 */12 * * *'
push:
branches:
- master
workflow_dispatch:
branches:
- master
Expand Down Expand Up @@ -63,7 +60,7 @@ jobs:
if [[ -f result.log ]]; then
git add result.log
fi
if [[ `git status --porcelain` ]]; then
if ! git diff --exit-code --quiet || git ls-files --others --exclude-standard | grep -q .; then
git commit -m "Github Action Auto Updated"
git push
fi
10 changes: 9 additions & 1 deletion README-EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Customize channel menus, automatically fetch and update the latest live source i
| urls_limit | 15 | Number of interfaces per channel |
| response_time_weight | 0.5 | Response time weight value (the sum of all weight values should be 1) |
| resolution_weight | 0.5 | Resolution weight value (the sum of all weight values should be 1) |
| recent_days | 60 | Retrieve interfaces updated within a recent time range (in days), reducing appropriately can avoid matching issues |
| recent_days | 30 | Retrieve interfaces updated within a recent time range (in days), reducing appropriately can avoid matching issues |
| ipv_type | "ipv4" | The type of interface in the generated result, optional values: "ipv4", "ipv6", "all" |

#### .github/workflows/main.yml:
Expand All @@ -50,6 +50,14 @@ Customize channel menus, automatically fetch and update the latest live source i

## Update Log

### 2024/3/21

- Fixed potential tracking failure of updated files, leading to update failure
- Adjusted the default recent update retrieval time to 30 days
- Optimized the recent update interface filter, when the number of interfaces is insufficient after filtering, other time range available interfaces will be used for supplementation
- Optimized the matching problem of Zhujiang and CCTV channels
- Removed push real-time trigger update

### 2024/3/18

- Added configuration item: ipv_type, used to filter ipv4, ipv6 interface types
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
| urls_limit | 15 | 单个频道接口数量 |
| response_time_weight | 0.5 | 响应时间权重值(所有权重值总和应为 1) |
| resolution_weight | 0.5 | 分辨率权重值 (所有权重值总和应为 1) |
| recent_days | 60 | 获取最近时间范围内更新的接口(单位天),适当减小可避免出现匹配问题 |
| recent_days | 30 | 获取最近时间范围内更新的接口(单位天),适当减小可避免出现匹配问题 |
| ipv_type | "ipv4" | 生成结果中接口的类型,可选值:"ipv4"、"ipv6"、"all" |

#### .github/workflows/main.yml:
Expand All @@ -50,6 +50,14 @@

## 更新日志

### 2024/3/21

- 修复潜在的更新文件追踪失效,导致更新失败
- 调整最近更新获取时间默认为 30 天
- 优化最近更新接口筛选,当筛选后不足指定接口个数时,将使用其它时间范围的可用接口补充
- 优化珠江、CCTV 频道匹配问题
- 移除推送实时触发更新

### 2024/3/18

- 新增配置项:ipv_type,用于过滤 ipv4、ipv6 接口类型
Expand Down
12 changes: 6 additions & 6 deletions config.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
source_file = "demo.txt"
final_file = "result.txt"
favorite_list = [
"珠江",
"广东珠江",
"开平综合",
"开平生活",
"CCTV1",
"CCTV5",
"CCTV5+",
"CCTV13",
"CCTV-1",
"CCTV-5",
"CCTV-5+",
"CCTV-13",
"广东体育",
"广东卫视",
"大湾区卫视",
Expand All @@ -20,5 +20,5 @@
urls_limit = 15
response_time_weight = 0.5
resolution_weight = 0.5
recent_days = 60
recent_days = 30
ipv_type = "ipv4"
352 changes: 176 additions & 176 deletions demo.txt

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async def visitPage(self, channelItems):
infoList = []
for page in range(1, pageNum):
try:
page_url = f"https://www.foodieguide.com/iptvsearch/?page={page}&s={name}"
page_url = f"http://tonkiang.us/?page={page}&s={name}"
self.driver.get(page_url)
WebDriverWait(self.driver, 10).until(
EC.presence_of_element_located(
Expand Down Expand Up @@ -107,7 +107,7 @@ async def visitPage(self, channelItems):
print(f"Error on sorting: {e}")
continue
updateChannelUrlsTxt(cate, channelUrls)
await asyncio.sleep(1)
# await asyncio.sleep(1)

def main(self):
asyncio.run(self.visitPage(getChannelItems()))
Expand Down
Loading

0 comments on commit d25be05

Please sign in to comment.