Giter VIP home page Giter VIP logo

spider-api's Introduction

spider-api

I've been repeating with creating logics using spiders, so I decided to create a api center to hold these APIs based on spiders. This tool is somehow based on the previous spider adapter tool.

How to Use

Currently it has 2 API: NHK radio and Bing image. So:

const radio = require('../index').nhk_radio;

radio.getRadios().then(res => console.log(res));

API List

NHK Radio

getRadios()

Return:

[ { title: '午後 X 時のNHKニュース',
    filename: '',
    duration: '297',
    size: '2376621',
    slow: 
     { filename: '',
       duration: '357',
       size: '2863341' },
    fast: 
     { filename: '',
       duration: '178',
       size: '1431693' } },
  ...]

getLatestRadio

Return:

{ title: '午後 X 時のNHKニュース',
    filename: '',
    duration: '297',
    size: '2376621',
    slow: 
     { filename: '',
       duration: '357',
       size: '2863341' },
    fast: 
     { filename: '',
       duration: '178',
       size: '1431693' }}

Bing Image

getImage

Return:

{ url:
   'http://bing.com/th?id=OHR.BlueChip_ROW8110118488_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp',
  copyright:
   'Circuit board of a computer (© Bobkov Evgeniy/Shutterstock)',
  copyrightlink: 'javascript:void(0)',
  title: '',
  hsh: 'e54b9ac63a19bec27a5c288b93d5c024' }

Sorry I removed other infor from the original response

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.