Coder Social home page Coder Social logo

wyp001 / article_crawler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tychozzz/article_crawler

0.0 0.0 0.0 46 KB

✨ Article Crawler is a package used to crawl articles with Markdown format from a specific webpage and store them locally in HTML / Markdown formats.

License: MIT License

Python 100.00%

article_crawler's Introduction

Article Crawler

PyPI Latest Release PyPI Downloads

English Doc | 中文文档

✨ Introduction

Article Crawler is a package used to crawl articles with Markdown format from a specific webpage and store them locally in HTML / Markdown formats.

🚀 Quick Start

  1. Install through pip

    pip install article-crawler
  2. Usage

    Usage: python3 -m article_crawler -u [url] -t [type] -o [output_folder] -c [class_] -i [id]

    Options:
      --version             show program's version number and exit
      -h, --help            show this help message and exit
      -u URL, --url=URL     crawled url (required)
      -t TYPE, --type=TYPE  crawled article type [csdn] | [juejin] | [zhihu] | [jianshu]
      -o OUTPUT_FOLDER, --output_folder=OUTPUT_FOLDER
                            output html / markdown / pdf folder (required)
      -w WEBSITE_TAG, --website_tag=WEBSITE_TAG
                            position of the article content in HTML (not required if 'type' is specified)
      -c CLASS_, --class=CLASS_
                            position of the article content in HTML (not required if 'type' is specified)
      -i ID, --id=ID        position of the article content in HTML (not required if 'type' is specified)
    
    • type: Specific websites, currently supported are CSDN, Zhihu, Juejin, and Jianshu.

    • website_tag / class_ / id:

      e.g. <div id="article_content" class="article_content clearfix"></div>

      • In this element, website_tag, class_, id is div, article_content clearfix, article_content respectively.
      1. You don't need to specify type when you specify website_tag / class_ / id.
      2. You need to use the web console to locate the position of the article.
      3. website_tag / class_ / id is used to locate the position of the article in HTML. It is possible to only use one or two of them instead of all.

Open Source License

MIT License see https://opensource.org/license/mit/

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.