Giter VIP home page Giter VIP logo

gofilm's Introduction

GoFilm

一个基于 vue 和 gin 实现的在线观影网站

效果展示: 点击访问演示站点

新版本测试访问站点: 点击前往

简介

GoFilm

项目采用vite + vue作为前端技术栈, 使用 ElementPlus 作为UI 框架进行开发

后端程序使用 Gin + gorm + go-redis 等相关框架提供接口服务, 使用 gocolly 和 robfig/cron 进行公共影视资源采集和定时更新功能

新版本说明

网站前台

  • 前台部分对网站名称以及播放源等部分信息与后台数据进行关联, 可通过后台进行修改
  • 影片详情部分以及首页导航数据结构发生变化, 样式保持一致
  • 默认访问地址: 服务器IP:默认端口 [http://127.0.0.1:3600]

管理后台

  • 新增管理后台功能组, 主要用于对 采集站点, 定时更新, 网站基本信息, 图片同步, 影片分类, 影片信息 等进行管理 (部分功能正在完善中, 不影响已有功能使用)
  • 管理后台访问需进行登录, 默认账号/密码: admin admin (登录成功后自行通过右上下拉弹窗进行密码修改)
  • 具体情况请自行搭建访问
  • 默认访问地址: 服务器IP:默认端口/manage [http://127.0.0.1:3600/manage]

更新说明

  • 后台功能完善阶段时不会同步更新到演示站点, 需自行使用服务器搭建体验
  • 使用中出现问题可在项目 Issues 中进行描述, 有需要添加的新功能和好的建议也可以提供
  • 新版本安装方法以及使用说明请查看本项目 film 文件夹下的说明文件

新增内容:

  • 新增详细部署说明文档, 以及 1Panel部署方式 , 点击查看
  • 修复docker-compose.yml 文件中的书写格式问题, 添加容器重启策略

目录结构

GoFilm-main                            
├─ client                              
│  ├─ public                           
│  │  └─ favicon.ico                   
│  ├─ src                              
│  │  ├─ assets                        
│  │  │  ├─ css                        
│  │  │  │  ├─ classify.css            
│  │  │  │  ├─ film.css                
│  │  │  │  └─ pagination.css          
│  │  │  └─ image                      
│  │  │     ├─ 404.png                 
│  │  │     └─ play.png                
│  │  ├─ components                    
│  │  │  ├─ Loading                    
│  │  │  │  ├─ index.ts                
│  │  │  │  └─ Loading.vue             
│  │  │  ├─ FilmList.vue               
│  │  │  ├─ Footer.vue                 
│  │  │  ├─ Header.vue                 
│  │  │  ├─ RelateList.vue             
│  │  │  └─ Util.vue                   
│  │  ├─ router                        
│  │  │  └─ router.ts                  
│  │  ├─ utils                         
│  │  │  ├─ cookie.ts                  
│  │  │  └─ request.ts                 
│  │  ├─ views                         
│  │  │  ├─ error                      
│  │  │  │  └─ Error404.vue            
│  │  │  ├─ index                      
│  │  │  │  ├─ FilmClassify.vue        
│  │  │  │  ├─ FilmClassifySearch.vue  
│  │  │  │  ├─ FilmDetails.vue         
│  │  │  │  ├─ Home.vue                
│  │  │  │  ├─ Play.vue                
│  │  │  │  └─ SearchFilm.vue          
│  │  │  └─ IndexHome.vue              
│  │  ├─ App.vue                       
│  │  ├─ main.ts                       
│  │  ├─ style.css                     
│  │  └─ vite-env.d.ts                 
│  ├─ auto-imports.d.ts                
│  ├─ components.d.ts                  
│  ├─ index.html                       
│  ├─ package.json                     
│  ├─ README.md                        
│  ├─ tsconfig.json                    
│  ├─ tsconfig.node.json               
│  └─ vite.config.ts                   
├─ film                                
│  ├─ data                             
│  │  ├─ nginx                         
│  │  │  ├─ html                       
│  │  │  │  ├─ assets                  
│  │  │  │  │  ├─ 404-b813c94a.png     
│  │  │  │  │  ├─ index-984712d6.js    
│  │  │  │  │  ├─ index-de4c7ff5.css   
│  │  │  │  │  └─ play-bb9c8990.png    
│  │  │  │  ├─ favicon.ico             
│  │  │  │  └─ index.html              
│  │  │  └─ nginx.conf                 
│  │  └─ redis                         
│  │     └─ redis.conf                 
│  ├─ server                           
│  │  ├─ config                        
│  │  │  └─ DataConfig.go              
│  │  ├─ controller                    
│  │  │  ├─ IndexController.go         
│  │  │  └─ SpiderController.go        
│  │  ├─ logic                         
│  │  │  ├─ IndexLogic.go              
│  │  │  └─ SpiderLogic.go             
│  │  ├─ model                         
│  │  │  ├─ Categories.go              
│  │  │  ├─ Movies.go                  
│  │  │  ├─ RequestParams.go           
│  │  │  ├─ ResponseJson.go            
│  │  │  └─ Search.go                  
│  │  ├─ plugin                        
│  │  │  ├─ common                     
│  │  │  │  ├─ dp                      
│  │  │  │  │  ├─ ProcessCategory.go   
│  │  │  │  │  └─ ProcessMovies.go     
│  │  │  │  └─ param                   
│  │  │  │     └─ SimpleParam.go       
│  │  │  ├─ db                         
│  │  │  │  ├─ mysql.go                
│  │  │  │  └─ redis.go                
│  │  │  └─ spider                     
│  │  │     ├─ Spider.go               
│  │  │     ├─ SpiderCron.go           
│  │  │     └─ SpiderRequest.go        
│  │  ├─ router                        
│  │  │  └─ router.go                  
│  │  ├─ go.mod                        
│  │  ├─ go.sum                        
│  │  ├─ main.go                       
│  │  └─ README.md                     
│  ├─ docker-compose.yml               
│  ├─ Dockerfile                       
│  └─ README.md                        
├─ server                              
│  ├─ config                           
│  │  └─ DataConfig.go                 
│  ├─ controller                       
│  │  ├─ IndexController.go            
│  │  └─ SpiderController.go           
│  ├─ logic                            
│  │  ├─ IndexLogic.go                 
│  │  └─ SpiderLogic.go                
│  ├─ model                            
│  │  ├─ Categories.go                 
│  │  ├─ Movies.go                     
│  │  ├─ RequestParams.go              
│  │  ├─ ResponseJson.go               
│  │  └─ Search.go                     
│  ├─ plugin                           
│  │  ├─ common                        
│  │  │  ├─ dp                         
│  │  │  │  ├─ ProcessCategory.go      
│  │  │  │  └─ ProcessMovies.go        
│  │  │  ├─ param                      
│  │  │  │  └─ SimpleParam.go          
│  │  │  └─ util                       
│  │  │     ├─ FileDownload.go         
│  │  │     └─ Request.go              
│  │  ├─ db                            
│  │  │  ├─ mysql.go                   
│  │  │  └─ redis.go                   
│  │  └─ spider                        
│  │     ├─ Spider.go                  
│  │     └─ SpiderCron.go              
│  ├─ router                           
│  │  └─ router.go                     
│  ├─ go.mod                           
│  ├─ go.sum                           
│  ├─ main.go                          
│  └─ README.md                        
├─ LICENSE                             
└─ README.md                           

起源

从正式接触编程语言到第一次动手敲代码, , 当时有动手做一些东西的想法,也正是在那时喜欢追番迷二次元, 曾想过做一个自己的动漫站,

但因为知识面匮乏, 总是在进行到某一步时就会遇到一些盲区, 从最开始的静态页面到后面的伪数据, 也实现过一些当时能做到的部分,

后面慢慢学习的过程中也渐渐遗忘了这个想法, 但因为一些偶然的因素, 想要做一个自己的开源项目, 于是就从零开始慢慢实现并完善了这个

影视站的各个部分, 期间也一点点修改颠覆了一些最开始的思路, 但目前主体功能基本完善, 后续也会定期进行一些bug修复和新功能的更新

如有发现Bug, 或者有好的建议, 可以进行反馈, 欢迎各位大佬来指点一二

更新迭代计划

  • 目前用户界面的一些功能有待开发和完善, 大家也可以继续提供一些好的建议
  • 目前pc端的历史记录写了一个简单的测试版, 后面有时间会同步完善pc和wrap端的历史记录和收藏功能
  • 前台功能目前基本满足观看的需求, 后续考虑切入一些登录和账户以及管理后台的功能,慢慢完善这个项目.

JetBrains 开源证书

感谢Jetbrains提供的免费开源许可, GoLang 和 WebStorm 为编程开发带来了良好的体验.

JetBrains Logo (Main) logo.

gofilm's People

Contributors

proudmubai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gofilm's Issues

账户、观看历史

不知道大佬有计划加入观看历史功能吗,我是拿来自己和朋友小范围看的,程序非常好,就是觉得加入一个观看历史更方便追剧,还有可以加入限制吗,像是必须注册登录才能进入首页,否则返回个请登陆,可以后台设置开放注册(之前搭建过mac,那个采集太麻烦了)

关于服务器繁忙,请稍后再试

首先非常感谢作者开源gofilm,平台的采集功能很强大。
我反映一个问题。刚开始部署好以后,可以进行正常的采集,但是随着采集量增加,尤其是对主站点进行全量采集后,就会出现“服务器繁忙,请稍后再试”,请问这个怎么解决。

关于后台页面无数据显示

首先非常感谢大佬开源GoFilm项目!
对于刚刚入门go语言的我来说提供了巨大的参考价值,其中的功能模块做得确实强大。
前天参考Markdown文档教程搭建起来了,但今天突然出现了标题所描述的问题,如下图:

Snipaste_2024-04-08_18-35-22

使用网页的开发者工具其实返回的是有数据的,但页面上并没有显示,特向大佬求教

Snipaste_2024-04-08_20-08-17

电脑能进行访问而手机无法进行连接访问

你好,项目进行部署到服务器上了,但是现在根据ip地址进行访问,使用电脑可以进行访问,但是使用手机(也试过切换到桌面)通过ip却不能进行访问,无法进行连接

演示站和项目不一致

作者同步一下自己的演示站呗,项目的最新版手机访问ui显示有问题。还有作者能告诉一下演示站用的采集链接嘛,感谢

部署出错

docker-compose 部署
mysql链接我外部的mysql
只有数据库名,表结构没有

2023/11/17 14:40:00 执行一次影片更新任务...

2023/11/17 14:40:03 /opt/server/model/Search.go:279 Error 1146 (42S02): Table 'FilmSite.search' doesn't exist
[1.370ms] [rows:0] SELECT count(*) FROM `search` WHERE `mid` = 73841 AND `search`.`deleted_at` IS NULL

2023/11/17 14:40:03 /opt/server/model/Search.go:290 Error 1146 (42S02): Table 'FilmSite.search' doesn't exist
[0.473ms] [rows:0] INSERT INTO `search` (`created_at`,`updated_at`,`deleted_at`,`mid`,`cid`,`pid`,`name`,`sub_title`,`c_name`,`class_tag`,`area`,`language`,`year`,`initial`,`score`,`update_stamp`,`hits`,`state`,`remarks`,`release_stamp`) VALUES ('2023-11-17 14:40:03.635','2023-11-17 14:40:03.635',NULL,73841,14,2,'罗密欧与祝英台国语','Romeo And His Butterfly Lover','香港剧','','香港','国语',2023,'L',0.000000,1700260290,0,'正片','已完结',1697552566)

2023/11/17 14:40:03 /opt/server/model/Search.go:279 sql: transaction has already been committed or rolled back
[0.010ms] [rows:0] SELECT count(*) FROM `search` WHERE `mid` = 73840 AND `search`.`deleted_at` IS NULL

2023/11/17 14:40:03 /opt/server/model/Search.go:290 sql: transaction has already been committed or rolled back
[0.024ms] [rows:0] INSERT INTO `search` (`created_at`,`updated_at`,`deleted_at`,`mid`,`cid`,`pid`,`name`,`sub_title`,`c_name`,`class_tag`,`area`,`language`,`year`,`initial`,`score`,`update_stamp`,`hits`,`state`,`remarks`,`release_stamp`) VALUES ('2023-11-17 14:40:03.637','2023-11-17 14:40:03.637',NULL,73840,14,2,'罗密欧与祝英台粤语','Romeo And His Butterfly Lover','香港剧','','香港','粤语',2023,'L',0.000000,1700260259,0,'正片','已完结',1697552563)
[GIN] 2023/11/17 - 14:40:10 | 200 |      277.71µs |      172.26.0.4 | GET      "/index"
[GIN] 2023/11/17 - 14:40:10 | 200 |     139.537µs |      172.26.0.4 | GET      "/navCategory"
2023/11/17 14:40:30 请求异常: URL: http://by.bfzyapi.com/api.php/provide/vod/?ac=detail&h=3&pg=2 Error: Get "http://by.bfzyapi.com/api.php/provide/vod/?ac=detail&h=3&pg=2": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
2023/11/17 14:40:30 获取数据失败:  Get "http://by.bfzyapi.com/api.php/provide/vod/?ac=detail&h=3&pg=2": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
2023/11/17 14:40:30 Update bf playDetail failed

对了还有代码里默认开了代理,我注释过了。

film_api启动报错了

[error] failed to initialize database, got error dial tcp 192.168.96.2:3306: connect: connection refused
panic: dial tcp 192.168.96.2:3306: connect: connection refused

goroutine 1 [running]:
main.init.0()
/opt/server/main.go:22 +0x52

Feature:一些功能提议

首先感谢大佬完成了我一直想做的东西

目前代码似乎与采集站高度耦合
提议:抽象采集站api 形成统一抽象层 不同的采集站使用不同的warper包装,这样可使前后端一致
针对不同的采集站提供不同的拓展,即以插件形式提供。
如有更多想法,期待作者的交流

client代码在什么地方被使用到?

client代码主要是vue代码,但是部署的时候,file目录下只有server文件和data文件,并没有看到client文件,请问client文件在什么时候被使用。client代码有一些定制化,我自行修复,如何打包部署呢。

大佬,播放的时候有问题

播放的时候,播放器出现The media could not be loaded, either because the server or network failed or because the format is not supported.

有可能支持tvbox的接口吗

tvbox有丰富的接口资源。咱们这个项目有可能兼容tvbox的接口,使这个项目成为网页版本的tvbox吗?
不知道作者有没有考虑过

安装失败求助

已经将 解压后的 film 文件夹 复制到了 /opt/film

在 /opt/film 中执行 docker compost build 报错:
image

image
[root@VM-8-3-centos film]# docker compose build
[+] Building 38.2s (8/8) FINISHED                                                                                                                                           docker:default
 => [film internal] load .dockerignore                                                                                                                                                0.0s
 => => transferring context: 2B                                                                                                                                                       0.0s
 => [film internal] load build definition from Dockerfile                                                                                                                             0.0s
 => => transferring dockerfile: 281B                                                                                                                                                  0.0s
 => [film internal] load metadata for docker.io/library/golang:1.20                                                                                                                   0.7s
 => [film 1/4] FROM docker.io/library/golang:1.20@sha256:c58c636721d1e30938f783f9daf1093a9939256f23f895f6b71b36580d0e46f9                                                             0.0s
 => [film internal] load build context                                                                                                                                                0.0s
 => => transferring context: 3.63kB                                                                                                                                                   0.0s
 => CACHED [film 2/4] WORKDIR /opt/server                                                                                                                                             0.0s
 => CACHED [film 3/4] ADD ./server /opt/server                                                                                                                                        0.0s
 => ERROR [film 4/4] RUN go build main.go                                                                                                                                            37.4s
------
 > [film 4/4] RUN go build main.go:
0.214 go: downloading github.com/gin-gonic/gin v1.9.0
0.215 go: downloading github.com/golang-jwt/jwt/v5 v5.1.0
0.394 go: downloading github.com/redis/go-redis/v9 v9.0.2
0.418 go: downloading github.com/robfig/cron/v3 v3.0.0
0.433 go: downloading gorm.io/gorm v1.24.6
0.507 go: downloading gorm.io/driver/mysql v1.4.7
0.778 go: downloading github.com/gin-contrib/sse v0.1.0
0.788 go: downloading github.com/mattn/go-isatty v0.0.17
0.797 go: downloading golang.org/x/net v0.8.0
1.086 go: downloading github.com/cespare/xxhash/v2 v2.2.0
1.098 go: downloading github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f
1.119 go: downloading github.com/jinzhu/now v1.1.5
1.158 go: downloading github.com/gocolly/colly/v2 v2.1.0
1.214 go: downloading github.com/jinzhu/inflection v1.0.0
1.222 go: downloading github.com/go-sql-driver/mysql v1.7.0
1.289 go: downloading github.com/go-playground/validator/v10 v10.12.0
1.293 go: downloading github.com/pelletier/go-toml/v2 v2.0.7
1.341 go: downloading github.com/ugorji/go/codec v1.2.11
1.352 go: downloading google.golang.org/protobuf v1.30.0
1.392 go: downloading gopkg.in/yaml.v3 v3.0.1
1.412 go: downloading golang.org/x/sys v0.6.0
1.673 go: downloading github.com/PuerkitoBio/goquery v1.5.1
1.676 go: downloading github.com/antchfx/htmlquery v1.2.3
1.686 go: downloading github.com/antchfx/xmlquery v1.2.4
1.698 go: downloading github.com/gobwas/glob v0.2.3
1.702 go: downloading github.com/kennygrant/sanitize v1.2.4
1.717 go: downloading github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca
1.720 go: downloading github.com/temoto/robotstxt v1.1.1
1.739 go: downloading google.golang.org/appengine v1.6.6
1.780 go: downloading github.com/go-playground/universal-translator v0.18.1
1.794 go: downloading github.com/leodido/go-urn v1.2.2
1.811 go: downloading golang.org/x/crypto v0.7.0
1.854 go: downloading golang.org/x/text v0.8.0
2.597 go: downloading github.com/antchfx/xpath v1.1.8
2.609 go: downloading github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e
2.616 go: downloading github.com/andybalholm/cascadia v1.2.0
2.629 go: downloading github.com/go-playground/locales v0.14.1
2.636 go: downloading github.com/golang/protobuf v1.5.0
34.18 # server/model/collect
34.18 model/collect/FilmDetail.go:181:49: undefined: config.OriginalFilmDetailKey
34.18 model/collect/FilmDetail.go:181:96: undefined: config.ResourceExpired
34.18 model/collect/FilmDetail.go:188:53: undefined: config.OriginalFilmDetailKey
34.18 model/collect/FilmList.go:100:35: undefined: config.FilmClassKey
34.18 model/collect/FilmList.go:100:62: undefined: config.ResourceExpired
34.18 model/collect/FilmList.go:106:36: undefined: config.FilmClassKey
------
failed to solve: process "/bin/sh -c go build main.go" did not complete successfully: exit code: 1
[root@VM-8-3-centos film]#

是文档没有更新吗?

请求添加一个定时弹窗的功能

非常感谢作者大大创建了一个这么优秀的项目!
另外能否请求作者大大添加一个定时弹窗的功能,自建了一个给家里孩子看动漫,但又不希望他看太久太伤眼睛,就希望间隔30分钟弹出一个提示框,类似“你当前已持续观看了30分钟,注意休息一下”,无论他当前处于什么页面,都强制弹出。希望大佬能采纳,再次感谢!!

redis.go报错

修改/server/config/DataConfig.go后运行go run main.go提示这个

plugin/db/redis.go:20:21: syntax error: unexpected literal .0 in composite literal; possibly missing comma or }

issue

您好 docker-compose 部署 一直报服务器繁忙,请稍后再试

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.