Compare commits

...

2 Commits

Author SHA1 Message Date
flow2000
61dbf42d57 fix:更换域名 2023-05-16 00:44:07 +08:00
flow2000
375338a8fd style:修改统计为51统计 2023-05-15 20:47:51 +08:00
4 changed files with 16 additions and 22 deletions

View File

@ -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](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](https://static.panghai.top/img/screenshot/news.panghai.top-v2.png)
![v2](https://static.aqcoder.cn/img/screenshot/news.aqcoder.cn-v2.png)
#### Vercel 一键部署(推荐)
@ -42,7 +42,7 @@ docker run -itd --name=news --restart=always -p 9134:8888 flow2000/news:2.0.0
### 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` 为昨天,依次类推 |
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)

View File

@ -52,7 +52,7 @@ async def index():
'''
latest_version=""
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:
print(e)
return FlowResponse.error(msg="NEWSAPI获取不到最新版本但仍可使用请联系https://github.com/flow2000/news",data={"current_version":VERSION})
@ -60,7 +60,7 @@ async def index():
"current_version":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 with session.get(url, verify_ssl=False) as response:

View File

@ -13,15 +13,9 @@
<link href="https://jsd.onmicrosoft.cn/npm/nprogress@0.2.0/nprogress.css" rel="stylesheet" />
<link rel="stylesheet" href="./news.css"/>
<link rel="shortcut icon" href="./favicon.svg">
<!-- 百度统计,可去掉 -->
<!-- 51统计,可去掉 -->
<script>
var _hmt = _hmt || [];
(function () {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?78565d6c29e30494518f051e7286e173";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
!function(p){"use strict";!function(t){var s=window,e=document,i=p,c="".concat("https:"===e.location.protocol?"https://":"http://","sdk.51.la/js-sdk-pro.min.js"),n=e.createElement("script"),r=e.getElementsByTagName("script")[0];n.type="text/javascript",n.setAttribute("charset","UTF-8"),n.async=!0,n.src=c,n.id="LA_COLLECT",i.d=n;var o=function(){s.LA.ids.push(i)};s.LA?s.LA.ids&&o():(s.LA=p,s.LA.ids=[],o()),r.parentNode.insertBefore(n,r)}()}({id:"K3C3rxPX9ZnLFSM9",ck:"K3C3rxPX9ZnLFSM9"});
</script>
</head>

View File

@ -1,13 +1,13 @@
//时间位移0表示今天1表示昨天以此类推
let offset = 0
//获取新闻API可根据部署域名更换
let NEWS_API = "https://news.panghai.top/60s"
let NEWS_API = "https://news.aqcoder.cn/60s"
//壁纸API
let BINGAPI = "https://news.panghai.top/bing"
let BINGAPI = "https://news.aqcoder.cn/bing"
//微博热搜API
let WEIBOAPI = "https://news.panghai.top/weibo"
let WEIBOAPI = "https://news.aqcoder.cn/weibo"
//B站热搜API
let BILIAPI = "https://news.panghai.top/bili"
let BILIAPI = "https://news.aqcoder.cn/bili"
//js入口
get_day_news(offset);