Giter VIP home page Giter VIP logo

h5ai_scraper's Introduction

h5ai scraper

A CLI tool and Dart package that can scrape file and directory URLs from h5ai instances.

Usage

This tool requires the Dart SDK. It can be compiled to a native binary - I just haven't done so.

$ dart pub global activate --source git https://github.com/hacker1024/h5ai_scraper.git
$ h5ai-scrape --help
Usage: h5ai-scrape -u <URL> [OPTIONS]
Options:
-u, --url      The URL of the h5ai instance.
    --aria2    Output an aria2 compatible URL list.
-h, --help     Show the usage information.

JSON output

By default, the tool outputs a list of JSON objects with the following structure:

Key Value
name The name of the file or directory
location The file or directory URL
size The size of the file or directory, in bytes
iconUrl The file or directory icon URL
dateModified The file or directory's last modified date (ISO-8601)
type Either "file" or "directory"
children The contents of the directory (directory only property)

aria2 usage

This tool can generate an input file for aria2, which is useful for downloading all the scraped files at once.

Dart package

Preparation

In your pubspec.yaml:

dependencies:
  h5ai_scraper:
    git: https://github.com/hacker1024/h5ai_scraper.git

Usage

import 'package:h5ai_scraper/h5ai_scraper.dart' as h5ai_scraper;

void main() async {
  final uri = Uri.parse('http://...');
  await for (final node in h5ai_scraper.scrape(uri)) {
    print(node);
  }
}

h5ai_scraper's People

Contributors

hacker1024 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

kememchan

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.