Skip to content

Commit

Permalink
更换域名
Browse files Browse the repository at this point in the history
  • Loading branch information
BennyThink committed Jul 28, 2023
1 parent 8c9b559 commit 4620577
Show file tree
Hide file tree
Showing 19 changed files with 148 additions and 131 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release_apps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
GENERATE_SOURCEMAP: ${{ secrets.GENERATE_SOURCEMAP }}
run: |
bash scripts/pre_build.sh
echo "REACT_APP_TAURI=https://yyets.dmesg.app" >> YYeTsFE/.env
echo "REACT_APP_TAURI=https://yyets.click" >> YYeTsFE/.env
- name: Install yarn
run: |
Expand Down
6 changes: 3 additions & 3 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ python /path/to/YYeTsBot/yyetsbot/bot.py

如果无法访问Telegram,可以使用如下网址下载数据

* [网站实时数据,MongoDB](https://yyets.dmesg.app/data/yyets_mongo.gz)
* [MySQL](https://yyets.dmesg.app/data/yyets_mysql.zip)
* [SQLite](https://yyets.dmesg.app/data/yyets_sqlite.zip)
* [网站实时数据,MongoDB](https://yyets.click/data/yyets_mongo.gz)
* [MySQL](https://yyets.click/data/yyets_mysql.zip)
* [SQLite](https://yyets.click/data/yyets_sqlite.zip)

# API 文档

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

* 人人影视bot,[戳我使用](https://t.me/yyets_bot)

* 人人影视分享站,[戳我使用](https://yyets.dmesg.app/)
* 人人影视分享站,[戳我使用](https://yyets.click/)

机器人和网站由我长期维护,如果遇到问题可以提issue。

Expand Down Expand Up @@ -95,7 +95,7 @@ yyets_offline - 人人影视离线数据

## 在线 原生应用程序

使用tauri封装的网页。内容等同于 `https://yyets.dmesg.app`,只不过是原生的App。使用方法如下
使用tauri封装的网页。内容等同于 `https://yyets.click`,只不过是原生的App。使用方法如下

1. 请到 [GitHub Release](https://github.com/tgbot-collection/YYeTsBot/releases) ,找最新的 `YYeTsBot App`
2. windows下载msi,macos下载dmg或tar.gz,Linux下载AppImage或deb(Debian based)
Expand All @@ -116,9 +116,9 @@ yyets_offline - 人人影视离线数据
```
>>> from yyets import YYeTs
>>> yy=YYeTs("逃避")
[2021-09-21 19:22:32 __init__.py:54 I] Fetching 逃避可耻却有用...https://yyets.dmesg.app/api/resource?id=34812
[2021-09-21 19:22:33 __init__.py:54 I] Fetching 无法逃避...https://yyets.dmesg.app/api/resource?id=29540
[2021-09-21 19:22:35 __init__.py:54 I] Fetching 逃避者...https://yyets.dmesg.app/api/resource?id=37089
[2021-09-21 19:22:32 __init__.py:54 I] Fetching 逃避可耻却有用...https://yyets.click/api/resource?id=34812
[2021-09-21 19:22:33 __init__.py:54 I] Fetching 无法逃避...https://yyets.click/api/resource?id=29540
[2021-09-21 19:22:35 __init__.py:54 I] Fetching 逃避者...https://yyets.click/api/resource?id=37089
>>> yy.result
[<yyets.Resource object at 0x10cc7b130>, <yyets.Resource object at 0x10ca0e880>, <yyets.Resource object at 0x10cc7b040>]
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pymongo==4.4.1
tornado==6.3.2
captcha==0.4
passlib==1.7.4
fakeredis==2.16.0
fakeredis==2.17.0
filetype==1.2.0
requests[socks]
tqdm==4.65.0
Expand Down
2 changes: 1 addition & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function import_db() {
docker-compose up -d mongo

echo "[4/5] 正在下载并导入数据库"
curl -o /tmp/yyets_mongo.gz https://yyets.dmesg.app/dump/yyets_mongo.gz
curl -o /tmp/yyets_mongo.gz https://yyets.click/dump/yyets_mongo.gz
file /tmp/yyets_mongo.gz
docker cp /tmp/yyets_mongo.gz yyets_mongo_1:/tmp
# special for windows
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

# Package meta-data.
NAME = "yyets"
DESCRIPTION = "https://yyets.dmesg.app/ wrapper"
DESCRIPTION = "https://yyets.click/ wrapper"
URL = "https://github.com/tgbot-collection/YYeTsBot"
EMAIL = "[email protected]"
AUTHOR = "BennyThink"
Expand Down
5 changes: 3 additions & 2 deletions yyets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@

__author__ = "Benny <[email protected]>"

import requests
import logging

API = "https://yyets.dmesg.app/api/resource?"
import requests

API = "https://yyets.click/api/resource?"

logging.basicConfig(
level=logging.INFO,
Expand Down
23 changes: 12 additions & 11 deletions yyets/healthcheck/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,20 @@
from apscheduler.schedulers.asyncio import AsyncIOScheduler
from telethon import TelegramClient, events

logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(filename)s [%(levelname)s]: %(message)s')
logging.getLogger('apscheduler.executors.default').propagate = False
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(filename)s [%(levelname)s]: %(message)s")
logging.getLogger("apscheduler.executors.default").propagate = False
api_id = int(os.environ.get("API_ID") or "3")
api_hash = os.environ.get("API_HASH") or "4"
bot_name = os.environ.get("BOT_NAME") or "yyets_bot"
bot_token = os.environ.get("BOT_token") or "123"

client = TelegramClient('client-hc', api_id, api_hash,
device_model="Benny-health-check", system_version="89", app_version="1.0.0")
client = TelegramClient(
"client-hc", api_id, api_hash, device_model="Benny-health-check", system_version="89", app_version="1.0.0"
)
check_status = []


@client.on(events.NewMessage(incoming=True, pattern='(?i).*欢迎使用,直接发送想要的剧集标题给我就可以了.*', from_users=bot_name))
@client.on(events.NewMessage(incoming=True, pattern="(?i).*欢迎使用,直接发送想要的剧集标题给我就可以了.*", from_users=bot_name))
async def my_event_handler(event):
logging.info("Okay it's working %s", event)
check_status.clear()
Expand All @@ -37,7 +38,7 @@ async def send_health_check():
# restart it
await bot_warning()
else:
await client.send_message(bot_name, '/start')
await client.send_message(bot_name, "/start")
check_status.append("check")


Expand All @@ -50,8 +51,8 @@ async def bot_warning():


async def website_check():
home = "https://yyets.dmesg.app/"
top = "https://yyets.dmesg.app/api/top"
home = "https://yyets.click/"
top = "https://yyets.click/api/top"
message = ""
try:
resp1 = requests.get(home)
Expand All @@ -75,10 +76,10 @@ async def website_check():
logging.info("It's working home: %s bytes; top: %s bytes", len(resp1.content), len(resp2.content))


if __name__ == '__main__':
if __name__ == "__main__":
scheduler = AsyncIOScheduler()
scheduler.add_job(send_health_check, 'interval', seconds=300)
scheduler.add_job(website_check, 'interval', seconds=60)
scheduler.add_job(send_health_check, "interval", seconds=300)
scheduler.add_job(website_check, "interval", seconds=60)
scheduler.start()
client.start()
client.run_until_disconnected()
2 changes: 1 addition & 1 deletion yyets/healthcheck/restart_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
logger.addHandler(handler)
logger.setLevel(logging.INFO)

URL = "https://yyets.dmesg.app/api/top"
URL = "https://yyets.click/api/top"
# URL = "https://www.baidu.com/"
req = requests.get(URL)

Expand Down
4 changes: 2 additions & 2 deletions yyets/worker/public/js/search.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const baseURL = "https://yyets.dmesg.app/";
const baseURL = "https://yyets.click/";
const resourceURL = baseURL + "resource.html?id=";
const indexURL = baseURL + "?id=index";

Expand Down Expand Up @@ -61,4 +61,4 @@ function reloadIndex() {
console.error(xhr);
});

}
}
2 changes: 1 addition & 1 deletion yyets/worker/workers-site/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async function handleEvent(event) {
return new Response(value, {
headers: {
"content-type": "application/json;charset=UTF-8",
"Access-Control-Allow-Origin": "https://yyets.dmesg.app"
"Access-Control-Allow-Origin": "https://yyets.click"
},
})

Expand Down
4 changes: 2 additions & 2 deletions yyetsbot/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
ZHUIXINFAN_SEARCH = "http://www.fanxinzhui.com/list?k={}"
ZHUIXINFAN_RESOURCE = "http://www.fanxinzhui.com{}"
# yyets website
DOMAIN = "https://yyets.dmesg.app/"
DOMAIN = "https://yyets.click/"
WORKERS = f"{DOMAIN}resource?id=" + "{}"
# https://yyets.dmesg.app/discuss#6464d5b1b27861fa44647e7e
# https://yyets.click/discuss#6464d5b1b27861fa44647e7e
DISCUSS = f"{DOMAIN}discuss#" + "{}"
# new zmz
NEWZMZ_SEARCH = "https://newzmz.com/subres/index/getres.html?keyword={}"
Expand Down
4 changes: 2 additions & 2 deletions yyetsbot/fansub.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ def search_preview(self, search_text: str) -> dict:
def search_result(self, resource_url) -> dict:
# yyets offline

# resource: https://yyets.dmesg.app/resource.html?id=37089
# comment: 'https://yyets.dmesg.app/resource.html?id=233#61893ae51e9152e43fa24124'
# resource: https://yyets.click/resource.html?id=37089
# comment: 'https://yyets.click/resource.html?id=233#61893ae51e9152e43fa24124'
if "#" in resource_url:
cid = resource_url.split("#")[1]
data: dict = self.db["comment"].find_one(
Expand Down
Loading

0 comments on commit 4620577

Please sign in to comment.