Skip to content

Seryiza/JSONhub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ascii bird

🐦‍⬛ JSON hub

We have RSSHub for RSS - now JSON hub for JSON.

Hmm?

JSON hub has simple and independent scripts to get (parse, scrap) information as JSON from web services you use (YouTube, Reddit, Steam, Marketplaces, etc).

Without dependencies, without shared functions, and I try to maintain them stupid but it works.

Usage

You can use it via DevTools (copy-paste to DevTools Console) or external tools (execute JS in playwright).

Available scripts

Script Description
scripts/youtube-subscriptions.js exports your YouTube subscriptions as a JSON array

Development

Setup

nix develop
bun install

Browser

The Nix shell makes google-chrome-stable and playwright-cli share the same profile at .jsonhub/chrome-profile by default.

So the usual flow is:

# open chrome, log in, close it
google-chrome-stable https://youtube.com

# run playwright-cli to experiment or test with the same account
bunx playwright-cli open https://youtube.com/feed
bunx playwright-cli snapshot
bunx playwright-cli close

Testing

Fixture files live in test/.

Naming:

  • test/<script-name>.contains.json

Behavior:

  • make test-via-playwright <script-name> loads the matching fixture
  • a fixture may be a single object or an array of objects
  • matching is partial: each fixture object only needs to be contained inside one output object

About

get json for sites you use 🐦‍⬛

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors