nange / gospider Goto Github PK
View Code? Open in Web Editor NEWgolang实现的爬虫框架,使用者只需关心页面规则,提供web管理界面。基于colly开发。
License: MIT License
golang实现的爬虫框架,使用者只需关心页面规则,提供web管理界面。基于colly开发。
License: MIT License
有计划开发使用js动态编写规则的功能吗
the default value is 10s.
RT
对于那些动态渲染的页面内容,需要支持调用浏览器去做爬虫任务。
考虑基于chromedp完成此项工作,接口需要仔细考虑。另外chromedp现在还存在一些问题,需要等待其v2版本,预计未来一到两周会发布v2 alpha版本,可以基于此版本考虑如何设计相关接口。
func newXMLElement(el *colly.XMLElement, ctx *Context) *XMLElement {
return &XMLElement{
Name: el.Name,
Text: el.Text,
Request: newRequest(el.Request, ctx),
Response: newResponse(el.Response, ctx),
DOM: el.DOM,
el: el,
}
}
func (x *XMLElement) Attr(k string) string {
return x.el.Attr(k)
}
目前支持Mysql,CSV。还可以支持如Kafka,Oracle,Sqlserver,Postgres等等。
目前只能新增导出数据库,还需要支持其他操作:
能编辑修改一条记录
能删除一条记录
maybe the slice of mutex. eg: []*sync.Mutex
目前支持mysql和csv导出,还可以添加更多导出类型,但是导出方式永远不可能由框架实现完。
需要能够支持规则或者用户自定义,业务上的导出逻辑。
具体方案待设计。
文档和易用性有明显可以改进的地方。
when gendry fixed the bug, we should update.
Ref: #24
目前没有用户管理界面,只有系统初始化时建了一个默认的管理员用户admin。需要新增一个用户管理界面,支持:
新增用户
编辑更新用户信息
删除一个用户
用户权限在此系统中,相对不是那么重要,所以可以直接内置几个用户角色,如admin/editor/viewer即可,不要考虑复杂的权限管理。
目前web目录下的router做的任务太重了,这样不方便测试。 考虑更清晰的做代码分层设计。
需要重构router目录下的代码, router只做参数获取和组装,然后调用service模块的接口,完成具体任务。也就是说需要将router中的大部分逻辑代码,移动到service模块去做。
packr安装不成功
./build.sh: line 30: packr: command not found
packr failed \n
eg: if the task status is running, we should not run it again.
eg: VisitForNextWithContext etc...
添加Makefile可以让开发体验更好,可以做的功能有:
检查安装依赖项,执行打包前端html静态资源,执行build,test,golint,govet,gofmt,go mod tidy等等。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.