mirror of
https://github.com/tgbot-collection/YYeTsBot.git
synced 2025-11-25 11:29:38 +08:00
one key Golang
This commit is contained in:
2
.github/workflows/normal_upgrade.yaml
vendored
2
.github/workflows/normal_upgrade.yaml
vendored
@@ -2,7 +2,7 @@ name: Normal upgrade
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
update:
|
||||
|
||||
79
.github/workflows/onekey.yaml
vendored
Normal file
79
.github/workflows/onekey.yaml
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
name: Release one key runner
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
|
||||
jobs:
|
||||
linux:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install Golang
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: '1.16.3'
|
||||
|
||||
- name: Build exe
|
||||
run: |
|
||||
cd yyetsweb
|
||||
make
|
||||
mv yyetsweb yyetsweb-linux
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: yyetsweb/yyetsweb-linux
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
||||
windows:
|
||||
runs-on: windows-2016
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install Golang
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: '1.16'
|
||||
|
||||
- name: Build exe
|
||||
run: |
|
||||
cd yyetsweb
|
||||
make
|
||||
mv yyetsweb.exe yyetsweb-windows.exe
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: yyetsweb/yyetsweb-windows.exe
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
macos:
|
||||
runs-on: macos-10.15
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install Golang
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: '1.16.3'
|
||||
|
||||
- name: Build exe
|
||||
run: |
|
||||
cd yyetsweb
|
||||
make
|
||||
mv yyetsweb yyetsweb-darwin
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: yyetsweb/yyetsweb-darwin
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -1,25 +1,34 @@
|
||||
# 项目手册
|
||||
|
||||
# 网站部署方式
|
||||
|
||||
## 一键脚本
|
||||
**仅支持AMD64,请先安装 docker、docker-compose和curl**
|
||||
### Linux/macOS:
|
||||
|
||||
**支持amd64/arm64,请先安装 docker、docker-compose和curl**
|
||||
|
||||
### Linux/macOS:
|
||||
|
||||
```bash
|
||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/tgbot-collection/YYeTsBot/master/scripts/install.sh)"
|
||||
````
|
||||
|
||||
### Windows
|
||||
|
||||
请再安装一个 [git for windows](https://gitforwindows.org/),然后桌面空白处右键,选择 `git bash here`
|
||||
再然后
|
||||
|
||||
```bash
|
||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/tgbot-collection/YYeTsBot/master/scripts/install.sh)"
|
||||
````
|
||||
|
||||
## docker-compose
|
||||
|
||||
参考 `yyetsweb`目录下的 `README`
|
||||
|
||||
# bot
|
||||
|
||||
# bot
|
||||
可以选择docker,也可以直接运行在机器上。
|
||||
|
||||
## docker-compose
|
||||
|
||||
* 参见 [这里](https://github.com/tgbot-collection/BotsRunner)
|
||||
@@ -82,15 +91,12 @@ python /path/to/YYeTsBot/yyetsbot/bot.py
|
||||
|
||||
参考 `yyets.service`
|
||||
|
||||
|
||||
|
||||
# 添加新的资源网站
|
||||
|
||||
欢迎各位开发提交新的资源网站!方法非常简单,重写 `BaseFansub`,实现`search_preview`和`search_result`,按照约定的格式返回数据。
|
||||
|
||||
然后把类名字添加到 `FANSUB_ORDER` 就可以了!是不是很简单!
|
||||
|
||||
|
||||
# 防爬
|
||||
|
||||
## 1. referer
|
||||
@@ -101,7 +107,6 @@ python /path/to/YYeTsBot/yyetsbot/bot.py
|
||||
|
||||
404的访问会被计数,超过10次会被拉入黑名单,持续3600秒,再次访问会持续叠加。
|
||||
|
||||
|
||||
# 持续部署
|
||||
|
||||
使用[Docker Hub Webhook](https://docs.docker.com/docker-hub/webhooks/)
|
||||
@@ -110,15 +115,20 @@ python /path/to/YYeTsBot/yyetsbot/bot.py
|
||||
参考listener [Webhook listener](https://github.com/tgbot-collection/Webhook)
|
||||
|
||||
# 归档资源下载
|
||||
|
||||
## Telegram 频道分享
|
||||
|
||||
* 包含了2021年1月11日为止的人人影视最新资源,MySQL为主。有兴趣的盆友可以用这个数据进行二次开发[戳我查看详情](https://t.me/mikuri520/668)
|
||||
* 字幕侠离线数据库 [从这里下载](https://t.me/mikuri520/715),这个数据比较粗糙,并且字幕侠网站还在,因此不建议使用这个
|
||||
|
||||
## 本地下载
|
||||
|
||||
如果无法访问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)
|
||||
|
||||
# API 文档
|
||||
|
||||
参考 [API.md](API.md)
|
||||
31
README.md
31
README.md
@@ -25,6 +25,7 @@
|
||||
**由于译名的不同,建议输入部分译名,然后从列表中进行选择。比如说想看权力的游戏第四季,那么直接搜索"权力的游戏"就可以了。**
|
||||
|
||||
## 命令
|
||||
|
||||
```
|
||||
start - 开始使用
|
||||
help - 帮助
|
||||
@@ -43,6 +44,7 @@ yyets_offline - 人人影视离线数据
|
||||

|
||||
|
||||
## 资源分享站截图
|
||||
|
||||
本网站永久免费,并且没有任何限制。
|
||||

|
||||
|
||||
@@ -58,8 +60,11 @@ yyets_offline - 人人影视离线数据
|
||||

|
||||
|
||||
# 如何下载磁力和电驴资源?迅雷提示资源敏感
|
||||
|
||||
## 电驴资源
|
||||
|
||||
请下载使用 [eMule](https://www.emule-project.net/home/perl/general.cgi?l=42) ,然后添加如下两个server list
|
||||
|
||||
* [server.met](http://www.server-met.de/)
|
||||
* [server list for emule](https://www.emule-security.org/serverlist/)
|
||||
|
||||
@@ -67,15 +72,27 @@ yyets_offline - 人人影视离线数据
|
||||
速度还可以哦
|
||||
|
||||
## 磁力
|
||||
使用百度网盘、115等离线,或使用utorrent等工具,记得更新下 [tracker list](https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all.txt) 哦
|
||||
|
||||
使用百度网盘、115等离线,或使用utorrent等工具,记得更新下 [tracker list](https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all.txt)
|
||||
哦
|
||||
|
||||
# 小白使用
|
||||
想要自己留一份资源,但是又不懂编程?
|
||||
没关系!请到 [GitHub Release](https://github.com/tgbot-collection/YYeTsBot/releases) 根据自己平台下载一键运行包!
|
||||
|
||||
* Windows用户双击 `start_windows.bat`
|
||||
* macOS 在终端中执行 `bash start_unix.sh`
|
||||
* Linux用户:没你的份🙄️
|
||||
想要自己留一份资源,但是又不懂编程? 没关系!目前提供两种方式,请根据自己情况选择
|
||||
|
||||
## 一键安装包
|
||||
|
||||
这个版本是新的UI,拥有全部的最新功能。
|
||||
[参考文档](https://github.com/tgbot-collection/YYeTsBot/blob/master/DEVELOPMENT.md#%E4%B8%80%E9%94%AE%E8%84%9A%E6%9C%AC)
|
||||
|
||||
## 一键运行包
|
||||
|
||||
这个版本使用起来也很简单,无依赖。步骤如下
|
||||
|
||||
1. 请到 [GitHub Release](https://github.com/tgbot-collection/YYeTsBot/releases) 根据自己平台下载一键运行包
|
||||
2. 请到 [database download](https://yyets.dmesg.app/database) 下载SQLite数据库,然后解压缩
|
||||
3. 把这两个文件放到同一个目录,结构如下 `yyets.sqlite yyetsweb`
|
||||
4. windows:双击第一步下载的文件; macos/Linux,cd到你的目录, `chmod +x yyetsweb ; ./yyetsweb`
|
||||
|
||||
打开浏览器 http://127.0.0.1:8888 就可以看到熟悉的搜索界面啦!
|
||||
|
||||
@@ -103,7 +120,9 @@ yyets_offline - 人人影视离线数据
|
||||
* 捐助我,[爱发电?](https://afdian.net/@BennyThink)
|
||||
|
||||
# 感谢
|
||||
|
||||
感谢所有[支持本项目](SPONSOR.md)的人!
|
||||
|
||||
# License
|
||||
|
||||
[MIT](LICENSE)
|
||||
|
||||
15
yyetsweb/Makefile
Normal file
15
yyetsweb/Makefile
Normal file
@@ -0,0 +1,15 @@
|
||||
default:
|
||||
echo "Installing dependencies..."
|
||||
go get -u github.com/go-bindata/go-bindata/...
|
||||
echo "Build static files..."
|
||||
make asset
|
||||
echo "Build current platform executable..."
|
||||
go build .
|
||||
|
||||
|
||||
asset:
|
||||
go-bindata -o assets.go resource.html index.html search.html js/... css/... fonts/... img/...
|
||||
|
||||
dev:
|
||||
go-bindata -o assets.go index.html
|
||||
|
||||
@@ -27,10 +27,10 @@ from retry import retry
|
||||
|
||||
from database import (AnnouncementResource, BlacklistResource, CaptchaResource,
|
||||
CommentChildResource, CommentNewestResource,
|
||||
CommentResource, DoubanResource, GrafanaQueryResource,
|
||||
MetricsResource, NameResource, OtherResource, Redis,
|
||||
ResourceResource, TopResource, UserLikeResource,
|
||||
UserResource, DoubanReportResource)
|
||||
CommentResource, DoubanReportResource, DoubanResource,
|
||||
GrafanaQueryResource, MetricsResource, NameResource,
|
||||
OtherResource, Redis, ResourceResource, TopResource,
|
||||
UserLikeResource, UserResource)
|
||||
from utils import ts_date
|
||||
|
||||
lib_path = pathlib.Path(__file__).parent.parent.joinpath("yyetsbot").resolve().as_posix()
|
||||
|
||||
@@ -10,14 +10,12 @@
|
||||
|
||||
# 导入数据
|
||||
|
||||
## 方法1: 自己迁移数据
|
||||
从 [这里](https://yyets.dmesg.app/database) 下载mongodb数据,然后导入
|
||||
|
||||
1. 下载[MySQL的数据](https://t.me/mikuri520/668)
|
||||
1. 导入数据到MySQL
|
||||
2. 运行 `python prepare/convert_db.py`
|
||||
```shell
|
||||
mongorestore --gzip --archive=yyets_mongo.gz
|
||||
```
|
||||
|
||||
## 方法2:使用我的导出
|
||||
参考 [这里](https://yyets.dmesg.app/help.html)
|
||||
# 运行
|
||||
|
||||
`python server.py`
|
||||
|
||||
@@ -9,7 +9,6 @@ __author__ = "Benny <benny.think@gmail.com>"
|
||||
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import sqlite3
|
||||
|
||||
from database import ResourceResource
|
||||
@@ -20,9 +19,7 @@ logging.warning("\n\n%s\n### SQLite adapter is immature! Only search and view re
|
||||
|
||||
class SQLite:
|
||||
def __init__(self):
|
||||
root_path = os.path.dirname(__file__)
|
||||
db_path = os.path.join(root_path, "yyets.sqlite")
|
||||
self.con = sqlite3.connect(db_path, check_same_thread=False)
|
||||
self.con = sqlite3.connect("yyets.sqlite", check_same_thread=False)
|
||||
self.cur = self.con.cursor()
|
||||
|
||||
def __del__(self):
|
||||
@@ -65,7 +62,8 @@ class ResourceSQLiteResource(ResourceResource, SQLite):
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
r = ResourceSQLiteResource()
|
||||
r = SQLite()
|
||||
print(globals())
|
||||
# r.get_resource_data(80000)
|
||||
a = r.search_resource("NIGERUHA")
|
||||
print(json.dumps(a, ensure_ascii=False))
|
||||
# a = r.search_resource("NIGERUHA")
|
||||
# print(json.dumps(a, ensure_ascii=False))
|
||||
|
||||
@@ -7,8 +7,10 @@
|
||||
|
||||
__author__ = "Benny <benny.think@gmail.com>"
|
||||
|
||||
from bs4 import BeautifulSoup
|
||||
import re
|
||||
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
from Mongo import DoubanMongoResource
|
||||
|
||||
with open("douban_detail.html") as f:
|
||||
|
||||
@@ -14,6 +14,7 @@ import os
|
||||
import random
|
||||
import re
|
||||
import string
|
||||
import sys
|
||||
|
||||
import fakeredis
|
||||
import redis
|
||||
@@ -24,7 +25,8 @@ predefined_str = re.sub(r"[1l0oOI]", "", string.ascii_letters + string.digits)
|
||||
|
||||
class Redis:
|
||||
def __init__(self):
|
||||
if os.getenv("DISABLE_REDIS"):
|
||||
if getattr(sys, '_MEIPASS', None):
|
||||
logging.info("%s Disable redis for standalone exe! %s", "#" * 10, "#" * 10)
|
||||
self.r = fakeredis.FakeStrictRedis()
|
||||
else:
|
||||
self.r = redis.StrictRedis(host=os.getenv("redis") or "localhost", decode_responses=True)
|
||||
|
||||
9
yyetsweb/go.mod
Normal file
9
yyetsweb/go.mod
Normal file
@@ -0,0 +1,9 @@
|
||||
module yyetsweb
|
||||
|
||||
go 1.16
|
||||
|
||||
require (
|
||||
github.com/gin-gonic/gin v1.7.2
|
||||
github.com/mattn/go-sqlite3 v1.14.8
|
||||
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4 // indirect
|
||||
)
|
||||
57
yyetsweb/go.sum
Normal file
57
yyetsweb/go.sum
Normal file
@@ -0,0 +1,57 @@
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
|
||||
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
|
||||
github.com/gin-gonic/gin v1.7.2 h1:Tg03T9yM2xa8j6I3Z3oqLaQRSmKvxPd6g/2HJ6zICFA=
|
||||
github.com/gin-gonic/gin v1.7.2/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY=
|
||||
github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A=
|
||||
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||
github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q=
|
||||
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
|
||||
github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no=
|
||||
github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
|
||||
github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE=
|
||||
github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4=
|
||||
github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I=
|
||||
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns=
|
||||
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y=
|
||||
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
|
||||
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/mattn/go-sqlite3 v1.14.8 h1:gDp86IdQsN/xWjIEmr9MF6o9mpksUgh0fu+9ByFxzIU=
|
||||
github.com/mattn/go-sqlite3 v1.14.8/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 h1:Esafd1046DLDQ0W1YjYsBW+p8U2u7vzgW2SQVmlNazg=
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo=
|
||||
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
|
||||
github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs=
|
||||
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4 h1:EZ2mChiOa8udjfp6rRmswTbtZN/QzUQp4ptM4rnjHvc=
|
||||
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
@@ -12,6 +12,7 @@ import json
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
from datetime import date, timedelta
|
||||
@@ -27,7 +28,10 @@ from database import AntiCrawler, CaptchaResource, Redis
|
||||
escape.json_encode = lambda value: json.dumps(value, ensure_ascii=False)
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
adapter = os.getenv("adapter") or "Mongo"
|
||||
if getattr(sys, '_MEIPASS', None):
|
||||
adapter = "SQLite"
|
||||
else:
|
||||
adapter = "Mongo"
|
||||
|
||||
logging.info("%s Running with %s. %s", "#" * 10, adapter, "#" * 10)
|
||||
|
||||
|
||||
@@ -1 +1,283 @@
|
||||
<!doctype html><html lang="zh"><head><meta charset="utf-8"/><link rel="icon" href="/logo.png"/><meta name="viewport" content="minimum-scale=1,initial-scale=1,width=device-width"/><meta name="theme-color" content="#000000"/><meta name="description" content="开源,免费,人人备胎^_^ Web Design by Zuiyu"/><link rel="apple-touch-icon" href="/logo192.png"/><script async src="https://www.googletagmanager.com/gtag/js?id=%REACT_APP_GA%"></script><script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","%REACT_APP_GA%")</script><link rel="manifest" href="/manifest.json"/><title>人人影视分享下载站</title></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var n,l,f=t[0],i=t[1],a=t[2],c=0,s=[];c<f.length;c++)l=f[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(p&&p(t);s.length;)s.shift()();return u.push.apply(u,a||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,f=1;f<r.length;f++){var i=r[f];0!==o[i]&&(n=!1)}n&&(u.splice(t--,1),e=l(l.s=r[0]))}return e}var n={},o={1:0},u=[];function l(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,l),r.l=!0,r.exports}l.m=e,l.c=n,l.d=function(e,t,r){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(l.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)l.d(r,n,function(t){return e[t]}.bind(null,n));return r},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="/";var f=this.webpackJsonpyyetsbot=this.webpackJsonpyyetsbot||[],i=f.push.bind(f);f.push=t,f=f.slice();for(var a=0;a<f.length;a++)t(f[a]);var p=i;r()}([])</script><script src="/static/js/2.d9edd2b6.chunk.js"></script><script src="/static/js/main.61127da7.chunk.js"></script></body></html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-K76PSKSSGX"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
|
||||
function gtag() {
|
||||
dataLayer.push(arguments);
|
||||
}
|
||||
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'G-K76PSKSSGX');
|
||||
</script>
|
||||
<meta charset="utf-8">
|
||||
<title>人人影视下载分享</title>
|
||||
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||
<link href="https://fonts.googleapis.com/css?family=Pacifico&display=swap" rel="stylesheet">
|
||||
<link href="/css/normalize.min.css" rel="stylesheet">
|
||||
<style>
|
||||
h1 {
|
||||
font-family: Pacifico, sans-serif;
|
||||
font-size: 4em;
|
||||
color: #3eb5f1;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-weight: 300;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
.centered {
|
||||
/*position: fixed;*/
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
/*transform: translate(-50%, -50%);*/
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#ferris {
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
/*a::after {*/
|
||||
/* content: attr(title);*/
|
||||
/* display: none;*/
|
||||
/*}*/
|
||||
|
||||
/*a:hover::after {*/
|
||||
/* display: block;*/
|
||||
/*}*/
|
||||
/* Style the tab */
|
||||
.tab {
|
||||
overflow: hidden;
|
||||
border: 1px solid #ccc;
|
||||
|
||||
/*background-color: #f1f1f1;*/
|
||||
}
|
||||
|
||||
/* Style the buttons inside the tab */
|
||||
.tab button {
|
||||
text-align: center;
|
||||
background-color: inherit;
|
||||
float: inherit;
|
||||
border: none;
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
padding: 14px 16px;
|
||||
transition: 0.3s;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
/* Change background color of buttons on hover */
|
||||
.tab button:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
/* Create an active/current tablink class */
|
||||
.tab button.active {
|
||||
background-color: #ccc;
|
||||
}
|
||||
|
||||
/* Style the tab content */
|
||||
.tabcontent {
|
||||
display: none;
|
||||
padding: 6px 12px;
|
||||
border: 1px solid #ccc;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.footer {
|
||||
text-decoration: none;
|
||||
color: green;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="centered">
|
||||
<h1>人人影视下载分享 By Benny</h1>
|
||||
<h2>
|
||||
<a href="https://www.buymeacoffee.com/bennythink" target="_blank"><img src="/img/default-green.png"
|
||||
alt="Buy Me A Coffee"
|
||||
style="height: 55px !important;width: 200px !important;"></a>
|
||||
<a href="https://afdian.net/@BennyThink" target="_blank"><img src="/img/afdian.png" alt="爱发电"
|
||||
style="height: 55px !important;width: 200px !important;"></a>
|
||||
</h2>
|
||||
<h2>本站数据库<b><a style="color: skyblue" href="/help.html">永久开源免费</a></b>,<abbr
|
||||
style="text-decoration: none" title="你也爬不下来啊">请不要做无意义的爬虫。</abbr>
|
||||
<a href="help.html" style="color: deepskyblue">使用帮助?</a>
|
||||
</h2>
|
||||
|
||||
<form action="search.html">
|
||||
<label>
|
||||
<input name="keyword" type="text">
|
||||
</label>
|
||||
<input type="submit" value="搜索">
|
||||
</form>
|
||||
<br>
|
||||
<h2>大家都在看🤔……每月重置排行榜</h2>
|
||||
<div class="tab">
|
||||
|
||||
</div>
|
||||
|
||||
<div id="topContent">
|
||||
|
||||
</div>
|
||||
|
||||
<h2>相关资源⬇️</h2>
|
||||
<h3>
|
||||
联系我 <a class="footer" href="https://t.me/BennyThink">Benny 小可爱</a>・
|
||||
YYeTs 机器人<a class="footer" href="https://t.me/yyets_bot">Telegram Bot</a>・
|
||||
Telegram <a class="footer" href="https://t.me/mikuri520">Channel</a>・
|
||||
开源 <a class="footer" href="https://github.com/tgbot-collection/YYeTsBot">GitHub</a>・
|
||||
我的博客 <a class="footer" href="https://dmesg.app/">土豆不好吃</a>
|
||||
</h3>
|
||||
</div>
|
||||
<form method="post" style="display: none" id="login-form">
|
||||
<label>
|
||||
<input type="text" required="required" placeholder="用户名" name="username"/>
|
||||
</label>
|
||||
<label>
|
||||
<input type="password" required="required" placeholder="密码" name="password"/>
|
||||
</label>
|
||||
<button class="but" type="submit" onclick="login()">登录</button>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
<script src="js/axios.min.js"></script>
|
||||
<script src="js/common.js"></script>
|
||||
<link href="css/noty.css" rel="stylesheet">
|
||||
<script src="js/noty.min.js"></script>
|
||||
|
||||
<script>
|
||||
accessMetrics("access");
|
||||
|
||||
// get top
|
||||
axios.get('/api/top')
|
||||
.then(function (response) {
|
||||
showTop(response.data)
|
||||
})
|
||||
.catch(function (error) {
|
||||
// handle error
|
||||
new Noty({
|
||||
type: 'error',
|
||||
layout: 'topRight',
|
||||
theme: 'relax',
|
||||
text: error.response.data,
|
||||
timeout: 1500
|
||||
}).show();
|
||||
console.log(error);
|
||||
})
|
||||
.then(function () {
|
||||
// always executed
|
||||
});
|
||||
|
||||
|
||||
function showTop(data) {
|
||||
const code2Name = data["class"];
|
||||
let buttonParent = document.getElementsByClassName("tab")[0]
|
||||
let topParent = document.getElementById("topContent")
|
||||
delete data["class"];
|
||||
for (let code in data) {
|
||||
let button = `<button class="tablinks" onclick="openCity(event, '${code}')">${code2Name[code]}</button>`;
|
||||
let div = `<div id="${code}" class="tabcontent"></div>`;
|
||||
|
||||
let buttonChild = document.createElement('button');
|
||||
buttonChild.innerHTML = button;
|
||||
buttonChild = buttonChild.firstChild;
|
||||
buttonParent.appendChild(buttonChild);
|
||||
|
||||
let divChild = document.createElement('div');
|
||||
divChild.innerHTML = div;
|
||||
divChild = divChild.firstChild;
|
||||
topParent.appendChild(divChild);
|
||||
|
||||
// render data
|
||||
let countryInfo = data[code]
|
||||
// let div = HTMLElement
|
||||
for (let each in countryInfo) {
|
||||
let info = countryInfo[each]["data"]["info"];
|
||||
let divParent = document.getElementById(code);
|
||||
let name = `${info.cnname} ${info.enname} ${info.aliasname}`;
|
||||
let html = `<h4><a title="浏览量 ${info.views}" style="text-decoration: none;color: cornflowerblue" href="/resource.html?id=${info.id}">${name}</a></h4>`;
|
||||
|
||||
let divChild = document.createElement('h4');
|
||||
divChild.innerHTML = html;
|
||||
divChild = divChild.firstChild;
|
||||
divParent.appendChild(divChild);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
document.getElementsByClassName("tab")[0].firstElementChild.className += " active"
|
||||
document.getElementById("ALL").style.display = "block"
|
||||
|
||||
let like = document.getElementById("LIKE");
|
||||
let user_cookie = getCookie("username");
|
||||
let login_form = document.getElementById("login-form");
|
||||
if (user_cookie === "") {
|
||||
like.innerHTML = "请登录,未注册用户将会自动注册<br><br>" + login_form.innerHTML + "<br>"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function login() {
|
||||
let username = document.getElementsByName("username")[0].value
|
||||
let password = document.getElementsByName("password")[0].value
|
||||
axios.post('/api/user', {
|
||||
username: username,
|
||||
password: password
|
||||
})
|
||||
.then(function (response) {
|
||||
let message = response.status === 201 ? "注册成功" : "登录成功"
|
||||
new Noty({
|
||||
type: 'success',
|
||||
layout: 'topRight',
|
||||
theme: 'relax',
|
||||
text: message,
|
||||
timeout: 1500
|
||||
}).show();
|
||||
setTimeout(function () {
|
||||
location.reload();
|
||||
}, 3000);
|
||||
})
|
||||
.catch(function (error) {
|
||||
new Noty({
|
||||
type: 'error',
|
||||
layout: 'topRight',
|
||||
theme: 'relax',
|
||||
text: error.response.data,
|
||||
timeout: 1500
|
||||
}).show();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function openCity(evt, cityName) {
|
||||
var i, tabcontent, tablinks;
|
||||
tabcontent = document.getElementsByClassName("tabcontent");
|
||||
for (i = 0; i < tabcontent.length; i++) {
|
||||
tabcontent[i].style.display = "none";
|
||||
}
|
||||
tablinks = document.getElementsByClassName("tablinks");
|
||||
for (i = 0; i < tablinks.length; i++) {
|
||||
tablinks[i].className = tablinks[i].className.replace(" active", "");
|
||||
}
|
||||
document.getElementById(cityName).style.display = "block";
|
||||
evt.currentTarget.className += " active";
|
||||
}
|
||||
|
||||
</script>
|
||||
</html>
|
||||
|
||||
@@ -9,11 +9,11 @@ __author__ = "Benny <benny.think@gmail.com>"
|
||||
|
||||
# convert to mongodb and con_sqlite
|
||||
|
||||
import json
|
||||
from typing import List
|
||||
|
||||
import pymongo
|
||||
import pymysql
|
||||
import json
|
||||
|
||||
from typing import List
|
||||
|
||||
con_mysql = pymysql.Connect(host="127.0.0.1", user="root", password="root", charset="utf8mb4", database="yyets",
|
||||
cursorclass=pymysql.cursors.DictCursor
|
||||
|
||||
@@ -7,11 +7,12 @@
|
||||
|
||||
__author__ = "Benny <benny.think@gmail.com>"
|
||||
|
||||
import threading
|
||||
import requests
|
||||
import json
|
||||
import threading
|
||||
from concurrent.futures.thread import ThreadPoolExecutor
|
||||
|
||||
import requests
|
||||
|
||||
s = requests.Session()
|
||||
|
||||
with open("index.json", ) as f:
|
||||
|
||||
@@ -7,10 +7,11 @@
|
||||
|
||||
__author__ = "Benny <benny.think@gmail.com>"
|
||||
|
||||
import pymongo
|
||||
import json
|
||||
import os
|
||||
|
||||
import pymongo
|
||||
|
||||
mongo_client = pymongo.MongoClient()
|
||||
|
||||
data_files = [i for i in os.listdir("data/") if i.endswith(".json")]
|
||||
|
||||
133
yyetsweb/server.go
Normal file
133
yyetsweb/server.go
Normal file
@@ -0,0 +1,133 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
||||
import _ "github.com/mattn/go-sqlite3"
|
||||
|
||||
func main() {
|
||||
banner := `
|
||||
▌ ▌ ▌ ▌ ▀▛▘
|
||||
▝▞ ▝▞ ▞▀▖ ▌ ▞▀▘
|
||||
▌ ▌ ▛▀ ▌ ▝▀▖
|
||||
▘ ▘ ▝▀▘ ▘ ▀▀
|
||||
|
||||
Lazarus came back from the dead. By @Bennythink
|
||||
`
|
||||
r := gin.Default()
|
||||
r.GET("/api/resource", entrance)
|
||||
r.GET("/js/*f", bindataStaticHandler)
|
||||
r.GET("/css/*f", bindataStaticHandler)
|
||||
r.GET("/fonts/*f", bindataStaticHandler)
|
||||
r.GET("/img/*f", bindataStaticHandler)
|
||||
r.GET("/index.html", bindataStaticHandler)
|
||||
r.GET("/search.html", bindataStaticHandler)
|
||||
r.GET("/resource.html", bindataStaticHandler)
|
||||
r.GET("/", bindataStaticHandler)
|
||||
|
||||
fmt.Printf(banner)
|
||||
|
||||
_ = r.Run("localhost:8888") // listen and serve on 0.0.0.0:8080 (for windows "localhost:8080")
|
||||
}
|
||||
|
||||
func bindataStaticHandler(c *gin.Context) {
|
||||
path := c.Request.RequestURI[1:]
|
||||
if strings.Contains(path, "search.html") || strings.Contains(path, "resource.html") {
|
||||
path = strings.Split(path, "?")[0]
|
||||
}
|
||||
|
||||
data, err := Asset(path)
|
||||
if err != nil {
|
||||
// Asset was not found.
|
||||
index, _ := Asset("index.html")
|
||||
_, _ = c.Writer.Write(index)
|
||||
}
|
||||
// Write asset
|
||||
|
||||
if strings.Contains(path, ".css") {
|
||||
c.Writer.Header().Add("content-type", "text/css")
|
||||
|
||||
} else if strings.Contains(path, ".js") {
|
||||
c.Writer.Header().Add("content-type", "text/javascript")
|
||||
|
||||
} else if strings.Contains(path, ".html") {
|
||||
c.Writer.Header().Add("content-type", "text/html")
|
||||
|
||||
} else if strings.Contains(path, ".png") {
|
||||
c.Writer.Header().Add("content-type", "image/png")
|
||||
}
|
||||
|
||||
_, _ = c.Writer.Write(data)
|
||||
|
||||
// Handle errors here too and cache headers
|
||||
}
|
||||
|
||||
type basicInfo struct {
|
||||
Id int `json:"id"`
|
||||
Cnname string `json:"cnname"`
|
||||
Enname string `json:"enname"`
|
||||
Aliasname string `json:"aliasname"`
|
||||
}
|
||||
type InnerInfo struct {
|
||||
Info basicInfo `json:"info"`
|
||||
}
|
||||
|
||||
type ItemData struct {
|
||||
Data InnerInfo `json:"data"`
|
||||
}
|
||||
|
||||
func search(c *gin.Context) {
|
||||
keyword, _ := c.GetQuery("keyword")
|
||||
keyword = "%" + keyword + "%"
|
||||
db, _ := sql.Open("sqlite3", "yyets.sqlite")
|
||||
rows, _ := db.Query("SELECT id, cnname, enname, aliasname FROM yyets "+
|
||||
"WHERE cnname LIKE ? or enname LIKE ? or aliasname LIKE ?", keyword, keyword, keyword)
|
||||
|
||||
var finaldata []ItemData
|
||||
for rows.Next() {
|
||||
var t ItemData
|
||||
_ = rows.Scan(&t.Data.Info.Id, &t.Data.Info.Cnname, &t.Data.Info.Enname, &t.Data.Info.Aliasname)
|
||||
finaldata = append(finaldata, t)
|
||||
}
|
||||
c.JSON(200, gin.H{
|
||||
"data": finaldata,
|
||||
})
|
||||
}
|
||||
|
||||
func resource(c *gin.Context) {
|
||||
id, _ := c.GetQuery("id")
|
||||
db, _ := sql.Open("sqlite3", "yyets.sqlite")
|
||||
|
||||
rows, _ := db.Query("SELECT data FROM yyets WHERE id=?", id)
|
||||
var result string
|
||||
for rows.Next() {
|
||||
_ = rows.Scan(&result)
|
||||
}
|
||||
var data map[string]interface{}
|
||||
json.Unmarshal([]byte(result), &data)
|
||||
|
||||
c.JSON(200, data)
|
||||
}
|
||||
|
||||
func entrance(c *gin.Context) {
|
||||
|
||||
var _, keyword = c.GetQuery("keyword")
|
||||
var _, id = c.GetQuery("id")
|
||||
|
||||
if keyword {
|
||||
search(c)
|
||||
} else if id {
|
||||
resource(c)
|
||||
} else {
|
||||
c.JSON(http.StatusBadRequest, gin.H{
|
||||
"message": "Bad request",
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
@@ -18,10 +18,11 @@ from tornado.log import enable_pretty_logging
|
||||
|
||||
from handler import (AnnouncementHandler, BlacklistHandler, CaptchaHandler,
|
||||
CommentChildHandler, CommentHandler, CommentNewestHandler,
|
||||
DBDumpHandler, DoubanHandler, GrafanaIndexHandler,
|
||||
GrafanaQueryHandler, GrafanaSearchHandler, IndexHandler,
|
||||
MetricsHandler, NameHandler, NotFoundHandler, DoubanReportHandler,
|
||||
ResourceHandler, TopHandler, UserHandler, UserLikeHandler)
|
||||
DBDumpHandler, DoubanHandler, DoubanReportHandler,
|
||||
GrafanaIndexHandler, GrafanaQueryHandler,
|
||||
GrafanaSearchHandler, IndexHandler, MetricsHandler,
|
||||
NameHandler, NotFoundHandler, ResourceHandler, TopHandler,
|
||||
UserHandler, UserLikeHandler)
|
||||
from migration.douban_sync import sync_douban
|
||||
from Mongo import OtherMongoResource
|
||||
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
|
||||
|
||||
block_cipher = None
|
||||
|
||||
|
||||
a = Analysis(['server.py'],
|
||||
pathex=['C:\\Users\\Benny\\Desktop\\yyetsweb\\yyetsweb'],
|
||||
binaries=[],
|
||||
datas=[
|
||||
('*.html', '.'),
|
||||
('js/*.js', 'js'),
|
||||
('css/*.css', 'css'),
|
||||
('css/3rd/*.css', 'css/3rd'),
|
||||
('img/*.png', 'img'),
|
||||
('yyets.sqlite', '.'),
|
||||
],
|
||||
hiddenimports=['SQLite'],
|
||||
hookspath=[],
|
||||
runtime_hooks=[],
|
||||
excludes=[],
|
||||
win_no_prefer_redirects=False,
|
||||
win_private_assemblies=False,
|
||||
cipher=block_cipher,
|
||||
noarchive=False)
|
||||
pyz = PYZ(a.pure, a.zipped_data,
|
||||
cipher=block_cipher)
|
||||
exe = EXE(pyz,
|
||||
a.scripts,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
a.datas,
|
||||
[],
|
||||
name='server',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
runtime_tmpdir=None,
|
||||
console=True )
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
DISABLE_REDIS=1 adapter=SQLite ./server
|
||||
@@ -1,4 +0,0 @@
|
||||
SET DISABLE_REDIS=1
|
||||
SET adapter=SQLite
|
||||
|
||||
server.exe
|
||||
Reference in New Issue
Block a user