GithubHelp home page GithubHelp logo

secwiki's Introduction

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,欢迎贡献爬虫插件。

secwiki's People

Contributors

y4er avatar

Watchers

 avatar

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.