fix:更换域名
This commit is contained in:
parent
84eb494b87
commit
4d8f325d77
16
README.md
16
README.md
@ -1,6 +1,6 @@
|
|||||||
# 每日早报
|
# 每日早报
|
||||||
|
|
||||||
![news](https://socialify.git.ci/flow2000/news/image?description=1&descriptionEditable=60%E7%A7%92%E8%AF%BB%E6%87%82%E4%B8%96%E7%95%8C%EF%BC%8C%E6%94%AF%E6%8C%81%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2%EF%BC%8C%E5%BF%AB%E9%80%9F%E7%94%9F%E6%88%90%E6%8E%A5%E5%8F%A3%E6%95%B0%E6%8D%AE&font=Inter&language=1&logo=https%3A%2F%2Fnews.panghai.top%2Ffavicon.svg&name=1&owner=1&pattern=Formal%20Invitation&stargazers=1&theme=Light)
|
![news](https://socialify.git.ci/flow2000/news/image?description=1&descriptionEditable=60%E7%A7%92%E8%AF%BB%E6%87%82%E4%B8%96%E7%95%8C%EF%BC%8C%E6%94%AF%E6%8C%81%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2%EF%BC%8C%E5%BF%AB%E9%80%9F%E7%94%9F%E6%88%90%E6%8E%A5%E5%8F%A3%E6%95%B0%E6%8D%AE&font=Inter&language=1&logo=https%3A%2F%2Fnews.aqcoder.cn%2Ffavicon.svg&name=1&owner=1&pattern=Formal%20Invitation&stargazers=1&theme=Light)
|
||||||
|
|
||||||
### 简介
|
### 简介
|
||||||
|
|
||||||
@ -10,11 +10,11 @@
|
|||||||
|
|
||||||
#### v1
|
#### v1
|
||||||
|
|
||||||
![v1](https://static.panghai.top/img/screenshot/news.panghai.top-v1.png)
|
![v1](https://static.aqcoder.cn/img/screenshot/news.aqcoder.cn-v1.png)
|
||||||
|
|
||||||
#### v2
|
#### v2
|
||||||
|
|
||||||
![v2](https://static.panghai.top/img/screenshot/news.panghai.top-v2.png)
|
![v2](https://static.aqcoder.cn/img/screenshot/news.aqcoder.cn-v2.png)
|
||||||
|
|
||||||
#### Vercel 一键部署(推荐)
|
#### Vercel 一键部署(推荐)
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ docker run -itd --name=news --restart=always -p 9134:8888 flow2000/news:2.0.0
|
|||||||
|
|
||||||
### API
|
### API
|
||||||
|
|
||||||
GET:`https://news.panghai.top/60s`,返回今日新闻json数据
|
GET:`https://news.aqcoder.cn/60s`,返回今日新闻json数据
|
||||||
|
|
||||||
##### 请求参数
|
##### 请求参数
|
||||||
|
|
||||||
@ -50,17 +50,17 @@ GET:`https://news.panghai.top/60s`,返回今日新闻json数据
|
|||||||
| :--------------- | :---- | :----- | :--: | :--------------------- | :--------------------- |
|
| :--------------- | :---- | :----- | :--: | :--------------------- | :--------------------- |
|
||||||
| `offset` | `query` | `int` | 否 | `0` |说明:`0` 为今天,`1` 为昨天,依次类推 |
|
| `offset` | `query` | `int` | 否 | `0` |说明:`0` 为今天,`1` 为昨天,依次类推 |
|
||||||
|
|
||||||
GET:`https://news.panghai.top/weibo`,返回微博热搜json数据
|
GET:`https://news.aqcoder.cn/weibo`,返回微博热搜json数据
|
||||||
|
|
||||||
##### 请求参数:无
|
##### 请求参数:无
|
||||||
|
|
||||||
GET:`https://news.panghai.top/bili`,返回B站热搜json数据
|
GET:`https://news.aqcoder.cn/bili`,返回B站热搜json数据
|
||||||
|
|
||||||
##### 请求参数:无
|
##### 请求参数:无
|
||||||
|
|
||||||
GET:`https://news.panghai.top/bing`,返回必应热搜json数据
|
GET:`https://news.aqcoder.cn/bing`,返回必应热搜json数据
|
||||||
|
|
||||||
##### 请求参数:无
|
##### 请求参数:无
|
||||||
|
|
||||||
更多详情请点击:[每日早报API](https://news.panghai.top/docs)
|
更多详情请点击:[每日早报API](https://news.aqcoder.cn/docs)
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ async def index():
|
|||||||
'''
|
'''
|
||||||
latest_version=""
|
latest_version=""
|
||||||
try:
|
try:
|
||||||
latest_version=requests.get('https://static.panghai.top/txt/version/news.txt',timeout=3).text
|
latest_version=requests.get('https://static.aqcoder.cn/txt/version/news.txt',timeout=3).text
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
return FlowResponse.error(msg="NEWSAPI获取不到最新版本,但仍可使用,请联系:https://github.com/flow2000/news",data={"current_version":VERSION})
|
return FlowResponse.error(msg="NEWSAPI获取不到最新版本,但仍可使用,请联系:https://github.com/flow2000/news",data={"current_version":VERSION})
|
||||||
@ -60,7 +60,7 @@ async def index():
|
|||||||
"current_version":VERSION,
|
"current_version":VERSION,
|
||||||
"latest_version":latest_version
|
"latest_version":latest_version
|
||||||
}
|
}
|
||||||
return FlowResponse.success(msg="news部署成功,查看接口文档:https://news.panghai.top/docs",data=data)
|
return FlowResponse.success(msg="news部署成功,查看接口文档:https://news.aqcoder.cn/docs",data=data)
|
||||||
|
|
||||||
async def fetch(session, url):
|
async def fetch(session, url):
|
||||||
async with session.get(url, verify_ssl=False) as response:
|
async with session.get(url, verify_ssl=False) as response:
|
||||||
|
8
index.js
8
index.js
@ -1,13 +1,13 @@
|
|||||||
//时间位移,0表示今天,1表示昨天,以此类推
|
//时间位移,0表示今天,1表示昨天,以此类推
|
||||||
let offset = 0
|
let offset = 0
|
||||||
//获取新闻API,可根据部署域名更换
|
//获取新闻API,可根据部署域名更换
|
||||||
let NEWS_API = "https://news.panghai.top/60s"
|
let NEWS_API = "https://news.aqcoder.cn/60s"
|
||||||
//壁纸API
|
//壁纸API
|
||||||
let BINGAPI = "https://news.panghai.top/bing"
|
let BINGAPI = "https://news.aqcoder.cn/bing"
|
||||||
//微博热搜API
|
//微博热搜API
|
||||||
let WEIBOAPI = "https://news.panghai.top/weibo"
|
let WEIBOAPI = "https://news.aqcoder.cn/weibo"
|
||||||
//B站热搜API
|
//B站热搜API
|
||||||
let BILIAPI = "https://news.panghai.top/bili"
|
let BILIAPI = "https://news.aqcoder.cn/bili"
|
||||||
|
|
||||||
//js入口
|
//js入口
|
||||||
get_day_news(offset);
|
get_day_news(offset);
|
||||||
|
Loading…
Reference in New Issue
Block a user