{"repo":"hezhizheng/go-movies","free":true,"listed":false,"github":"https://github.com/hezhizheng/go-movies","clone":"git clone https://github.com/hezhizheng/go-movies.git","description":"golang spider Crawler 爬虫 电影","language":"Go","stars":275,"topics":["go","golang","spider","crawler","colly","gocolly","movies","redis","docker","fasthttp"],"license":"MIT","category":"scrapers-browser-automation","readme_excerpt":"GoMovies golang + redis 实现的影站(低级爬虫)。无管理后台，效果站：http://film.hzzio.top/ 支持手机端访问播放 Github地址 https://github.com/hezhizheng/go-movies features - 使用 Golang embed 内嵌静态资源(html、js、css等)，运行只依赖编译后可执行的二进制文件与redis - 支持docker启动方式 - 简单资源分类、搜索的支持 - 内置自动爬虫、自动更新最新资源的定时任务，基本满足日常看片需求。 - 钉钉机器人通知 Tip - 暂时只维护API请求版本 API接口说明，后续可能追加其他资源支持 (有其他资源可推荐) - API版本首次启动会全量请求并存储到redis，之后每小时定时爬取最近更新的影视资源 目录结构 首页效果 使用安装 (go version = 1.18) 配置说明 参数名 描述 ---------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ app.spider path 爬虫路由 app.spider path name 爬虫路由名称 app.debug path debug的路由 app.debug path name debug的路由名称 cron.timing spider 定时爬虫的CRON表达式 ding.access token 钉钉机器人token app.spider mod 接口请求方式，async(使用goroutine并发请求数据，快但会被频控，导致请求超时)、sync(不使用goroutine请求，慢但比较稳定，如使用async出现请求超时，建议改为sync模式) （默认为async） app.spider mod 固定使用haohua app.debug mod 开发模式建议设置为 true 避免修改静态资源需要重启服务 开启爬虫 - 已内置定时爬虫，首次全量请求之后，每小时定时爬取最近更新的影视资源(可自行修改配置文件cron.timing spider表达式来控制间隔) - 主动运行：直接访问链接 http://127.0.0.1:8899/movies-spider - 耗时：具体时间受目标网站/接口的响应速度影响 Tools - 数据库 redis 缓存/持久 https://github.com/Go-redis/redis - Zset：每个分类为一个有序集合 - score：电影更新的时间戳 - member：电影对应的实际URL - Hash：电影具体信息(名称、封面图等)、每页数据的缓存 - 路由 https://github.com/julienschmidt/httprouter - json解析 jsoniter github.com/json-iterator/go - 跨平台打包：https://github.com/mitchellh/gox - web server 框架：https://github.com/valyala/fasthttp - 配置文件读取：https://github.com/spf13/vip","default_branch":null,"files":null,"tree":[],"storefront":"/r/hezhizheng","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/hezhizheng/go-movies/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}