Code Monkey home page Code Monkey logo

getzhrb's Introduction

2017.03.23

此程序是我之前在使用博客软件GitBlog时想出来的。

那时候是想在本地(局域网内)浏览知乎日报,不存在任何商业用途.

程序流程

  • 获取知乎日报首页日报列表URL.
  • 进入每个URL获取内容,解析内容,添加作者相关.
  • 解析并下载图片到本地.
  • 把图片链接替换为markdown格式的链接,并返回到原文中
  • 添加原文URL
  • 保存为*.md文件

核心涉及

  • html2text模块,HTML转为markdown的模块
  • 图片下载,其中使用with这个Python上下文管理器
  • 目录进化,这个有点绕。
  • requests 流式媒体支持.在line:91的stream=True,这个应该是底层urllib3的某个方法支持的参数.往后的开发中仍然遇到过

getzhrb's People

Contributors

kohna avatar

Watchers

James Cloos avatar  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.