Skip to content

一个文章聚合知识本地化的项目

Notifications You must be signed in to change notification settings

5l1v3r1/secwiki

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

secwiki

一个使用selenium+phantomjs写的小项目。插件化、本地化。

目的

由于自己的rss炸了,所以写了爬虫来抓取文章并且保存为pdf文档。 也起到文章分类知识聚合存档的一个效果。

依赖

  • python3
  • bs4
  • requests
  • selenium
  • phantomjs

插件

def run():
    posts = []
    post = {
        'date': date,
        'title': title,
        'url': url,
        'cate': cate
    }
    posts.append(post)
    return posts

插件目录在plugin目录,格式如上,需要定义run方法并且返回posts数组

BUG

Message: {"errorMessage":"Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: \"script-src github.githubassets.com\".\n","request":{"objectName":"","statusCode":200,"headers":{"Cache":"no-cache","Content-Type":"application/json;charset=UTF-8"}}} Screenshot: available via screen

由于phantomjs暂停项目开发遗留的这个问题,未找到解决方案。

如果目标网站直接是静态pdf(比如http://1.com/1.pdf),那么会出现输出的pdf为空白,未找到解决方案。

END

个人项目,欢迎star、fork、pr,欢迎贡献爬虫插件。

About

一个文章聚合知识本地化的项目

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages