X Tutup
The Wayback Machine - https://web.archive.org/web/20200905071940/https://github.com/owainlewis/webquery/
Skip to content
master
Go to file
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
Jul 3, 2019
Jul 3, 2019
Jul 3, 2019

README.md

Web Query

An API exposing web pages are pure data (GraphQL + JSON)

API

A simple API allows you to pull data from web pages with a simple query language.

To get all the stories from Hacker News

POST /api/v1/query \
-H 'Content-Type: application/json' \
-d '{"uri": "https://news.ycombinator.com", "selector": ".storylink"}"'

Which will return

{
   "elements":[
      {
         "tag":"a",
         "text":"How the Dat Protocol Works",
         "attributes":{
            "href":"https://datprotocol.github.io/how-dat-works/",
            "class":"storylink"
         }
      },
      {
         "tag":"a",
         "text":"Understanding Kafka with Factorio",
         "attributes":{
            "href":"https://hackernoon.com/understanding-kafka-with-factorio-74e8fc9bf181",
            "class":"storylink"
         }
      }
   ]
}

About

An API exposing web pages are pure data (GraphQL + JSON)

Topics

Resources

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.
X Tutup