1 Star 0 Fork 17

地风升/影视资源库(站点+采集)

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
app.py 2.62 KB
一键复制 编辑 原始数据 按行查看 历史
好穷小子 提交于 2020-04-20 16:23 . 20200420
#!/usr/bin/env python3
import tornado.ioloop
import tornado.web
from controllers import index
from controllers import magnet
from controllers import admin
from controllers import e
from controllers import uimethods as umt
import os
import platform
if platform.system() == "Windows":
import asyncio
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
BASE_DIR = os.path.dirname(__file__)
settings = {
'template_path': os.path.join(BASE_DIR, 'template'),
'static_path': os.path.join(BASE_DIR, 'static'),
'static_url_prefix': '/static/',
'cookie_secret': '43809138f51b96f8ac24e79b3a2cb482',
'login_url': '/e/login',
'xsrf_cookies': True,
'debug': True,
'autoreload': True,
'ui_methods': umt,
}
application = tornado.web.Application([
# 主页
(r"/", index.IndexHandler),
(r"/index", index.IndexHandler),
# 文章页
(r"/vod/([\d]+).html", index.VodHandler),
# 查询
(r"/search", index.SearchHandler),
# 关于
(r"/about", index.AboutHandler),
# 登录
(r"/e/login", e.LoginHandler),
(r"/e/index", e.IndexHandler),
(r"/e/welcome", e.WelcomeHandler),
(r"/e/settings", e.SettingsHandler),
(r"/e/vod", e.VodHandler),
(r"/e/vodedit", e.VodeditHandler),
(r"/e/userlist", e.UserlistHandler),
(r"/e/profile", e.ProfileHandler),
(r"/e/pwd", e.PwdHandler),
# Dashboard
(r"/e/article", e.ArticleHandler),
(r"/e/vod", e.VodHandler),
# Tag 管理
# 个人资料管理
# 友链管理
(r"/e/flink", e.FlinkHandler),
# 登出
(r"/e/logout", e.LogoutHandler),
# 出状态图
(r"/e/api/v1/status", e.StatusApiHandler),
# 登录
(r"/admin/login", admin.LoginHandler),
# Dashboard
(r"/admin/index", admin.IndexHandler),
# Dashboard
(r"/admin/article", admin.ArticleHandler),
(r"/admin/vod", admin.VodHandler),
# Tag 管理
(r"/admin/tag", admin.TagsHandler),
# 个人资料管理
(r"/admin/profile", admin.ProfileHandler),
# 网站资料管理
(r"/admin/blog", admin.BlogHandler),
# 友链管理
(r"/admin/flink", admin.FlinkHandler),
# 登出
(r"/admin/logout", admin.LogoutHandler),
# 出状态图
(r"/admin/api/v1/status", admin.StatusApiHandler),
# 上传图片
(r"/upload", admin.UploadHandler),
# 文章页
(r"/tag/([\d]+)", index.TagsHandler),
# 404处理页面
(r"/404", index.NotfindHandler),
# 500处理页面
(r"/500", index.ServerErrorHandler),
(r".*", index.NotfindHandler),
], **settings)
if __name__ == '__main__':
application.listen(8003)
tornado.ioloop.IOLoop.instance().start()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/fenghuall/vsplider.git
git@gitee.com:fenghuall/vsplider.git
fenghuall
vsplider
影视资源库(站点+采集)
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385