feat: update urls, ignore invalid urls

pull/5/head
LiLittleCat 2 years ago
parent b919a281b4
commit 2ce3ab1d0a
  1. 12
      README.md
  2. 16
      README_en.md
  3. 3
      convert.py

@ -22,14 +22,10 @@
>
> - [ 🔐 ] 需要输入 API key
>
> - [ 🚫 ] 已失效
>
> - [ 🌎 ] 需要科学上网
>
> - 利用横线将不同风格的网页分开
- [ 🚫 ] ~~[https://chat.tgbot.co](https://chat.tgbot.co/) 来自 <https://github.com/zu1k>~~
- [ 👍 ] [https://chat.theb.ai](https://chat.theb.ai) 来自 <https://github.com/Chanzhaoyu/chatgpt-web>
- [ 👍 ] [https://freechatgpt.chat](https://freechatgpt.chat/) 来自 <https://github.com/ztjhz/ChatGPTFreeApp>
@ -42,8 +38,6 @@
---
- [ 🚫 ] ~~[https://chatgpt.ddiu.me](https://chatgpt.ddiu.me) 来自 <https://github.com/ddiu8081/chatgpt-demo>~~
- [https://chat.ninvfeng.xyz](https://chat.ninvfeng.xyz/) 来自 <https://github.com/ninvfeng/chatgpt>
- [https://www.aitoolgpt.com](https://www.aitoolgpt.com/) & [https://www.chatsverse.xyz](https://www.chatsverse.xyz/) 来自 <https://github.com/ourongxing/chatgpt-vercel>
@ -90,4 +84,10 @@
---
### 🚫 已失效
- ~~[https://chat.tgbot.co](https://chat.tgbot.co/) 来自 <https://github.com/zu1k>~~
- ~~[https://chatgpt.ddiu.me](https://chatgpt.ddiu.me) 来自 <https://github.com/ddiu8081/chatgpt-demo>~~
## 🤟 玩得开心

@ -21,12 +21,8 @@ Feel free to submit issues and PRs to add new websites or report website failure
>
> - [ 🔐 ] API key required
>
> - [ 🚫 ] Invalid
>
> - Use a horizontal line to separate web pages of different styles
- [ 👍 ] [https://chat.tgbot.co](https://chat.tgbot.co/) 来自 <https://github.com/zu1k>
- [ 👍 ] [https://chat.theb.ai](https://chat.theb.ai) 来自 <https://github.com/Chanzhaoyu/chatgpt-web>
- [ 👍 ] [https://freechatgpt.chat](https://freechatgpt.chat/) 来自 <https://github.com/ztjhz/ChatGPTFreeApp>
@ -39,8 +35,6 @@ Feel free to submit issues and PRs to add new websites or report website failure
---
- [ 🚫 ] ~~[https://chatgpt.ddiu.me](https://chatgpt.ddiu.me) 来自 <https://github.com/ddiu8081/chatgpt-demo>~~
- [https://chat.ninvfeng.xyz](https://chat.ninvfeng.xyz/) 来自 <https://github.com/ninvfeng/chatgpt>
- [https://www.aitoolgpt.com](https://www.aitoolgpt.com/) & [https://www.chatsverse.xyz](https://www.chatsverse.xyz/) 来自 <https://github.com/ourongxing/chatgpt-vercel>
@ -67,7 +61,7 @@ Feel free to submit issues and PRs to add new websites or report website failure
- [https://94gpt.com](https://94gpt.com)
- [https://chat.yqcloud.top](https://chat.yqcloud.top/) 来自 <https://github.com/binjie09>
- [https://chat.yqcloud.top](https://chat.yqcloud.top/) from <https://github.com/binjie09>
---
@ -87,4 +81,10 @@ Feel free to submit issues and PRs to add new websites or report website failure
---
🤟 Have Fun!
### 🚫 Invalid
- ~~[https://chat.tgbot.co](https://chat.tgbot.co/) 来自 <https://github.com/zu1k>~~
- ~~[https://chatgpt.ddiu.me](https://chatgpt.ddiu.me) from <https://github.com/ddiu8081/chatgpt-demo>~~
🤟 Have Fun!

@ -7,9 +7,12 @@ import re
# Read the content of README.md
with open("README.md", "r", encoding="utf-8") as file:
content = file.read()
# Stop reading when reaching a line that contains '### 🚫 已失效'
content = content.split('### 🚫 已失效')[0]
# Find all URLs in the content []
urls = re.findall(r'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+(?=\])', content)
# urls = re.findall(r'(?<!~~)(http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+)(?!~~)', content)
# Remove the last '/' in the URL and collapse the same URLs

Loading…
Cancel
Save