Evaluate JavaScript on a URL through headless Chrome browser.

Overview

jseval

Evaluate JavaScript on a URL through headless Chrome browser.

build

docker build -t jseval -f jseval.dockerfile .

usage

docker run --rm jseval --help

quick start

Run:

$ docker run --rm jseval --url "https://www.tradingview.com/" --evaluate 'JSON.stringify([document.location.href, document.title])' --headless --output

stdout would be like:

["https://www.tradingview.com/","Free Stock Charts, Stock Quotes and Trade Ideas — TradingView"]

examples

  • for complicated JS
docker run jseval \
	--url "https://www.tradingview.com/ideas/bitcoin/" \
	--evaluate "$(cat <<- EOT
		JSON.stringify(
			Array.from(
				document.querySelectorAll("div.tv-feed-layout__card-item[data-widget-type=\"idea\"] > div > div > a")
			)
			.map(a => a.href)
			.concat(document.location.href)
		)
	EOT
	)" \
	--headless \
	--output

help

Usage: jseval [options]

Options:
  --url <url>          set url
  --sleep <seconds>    set sleep (default: 0)
  --evaluate <script>  set script to evaluate
  --output             output to stdout
  --file <file>        output to file (default: "")     
  --headless           enables headless (default: false)
  --log                enables log
  -h, --help           display help for command

todables
  just eval js, not console.log as a default
    should be like: docker run --rm jseval --url "https://www.tradingview.com/" --evaluate 'console.log(JSON.stringify([document.location.href, document.title]))' --headless --output
  should be able to set cookies 
You might also like...

A plugin for Strapi Headless CMS that provides ability to sign-in/sign-up to an application by link had sent to email.

A plugin for Strapi Headless CMS that provides ability to sign-in/sign-up to an application by link had sent to email.

Strapi PasswordLess Plugin A plugin for Strapi Headless CMS that provides ability to sign-in/sign-up to an application by link had sent to email. A pl

Dec 12, 2022

Builder.io + Shopify Hydrogen - headless visual page building example

Builder.io + Shopify Hydrogen - headless visual page building example

Builder.io + Shopify Hydrogen - headless visual page building example Example repo using Builder.io for drag and drop page building with Shopify hydro

Oct 30, 2022

Remix starter kit with Tailwind CSS family of libraries: Headless UI, Radix UI, VechaiUI, daisyUI, and more

Remix starter kit with Tailwind CSS family of libraries: Headless UI, Radix UI, VechaiUI, daisyUI, and more

Remix Tailwind Starter Kit Remix starter kit with Tailwind CSS v3 family of libraries. Example demo to combine the best Tailwind-related ecosystem suc

Dec 18, 2022

A plugin for Strapi Headless CMS that provides the ability to transform the API request or response.

strapi-plugin-transformer A plugin for Strapi that provides the ability to transform the API request and/or response. Requirements The installation re

Jan 6, 2023

⏪ Rewinds – Remix Tailwind Starter Kit with Tailwind CSS, Headless UI, Radix UI, and more

⏪ Rewinds – Remix Tailwind Starter Kit with Tailwind CSS, Headless UI, Radix UI, and more

⏪ Rewinds – Remix Tailwind Starter Kit Rewinds is a Remix starter kit with Tailwind CSS v3 family of libraries. This is an example demo to combine the

Dec 24, 2022

Update & Revalidate Content from a Headless CMS in Next.js with Incremental Static Regeneration

Update & Revalidate Content from a Headless CMS in Next.js with Incremental Static Regeneration Demo for tutorial How to Update & Revalidate Content f

Jul 22, 2022

👩‍🎤 Headless, type-safe, UI components for the next generation Web3.Storage APIs.

👩‍🎤 Headless, type-safe, UI components for the next generation Web3.Storage APIs.

Headless, type-safe, UI components for the next generation Web3.Storage APIs. Documentation beta.ui.web3.storage Examples React Sign up / Sign in Sing

Dec 22, 2022

A thin, opinionated headless wiki with few features.

thinwiki A thin, opinionated headless wiki with few features. Git used as a backing store Markdown files with front matter used for pages index.md pag

Oct 13, 2022

A bodacious, secure, headless content management system.

A bodacious, secure, headless content management system. Cassiopeia allows you to create your blog with a customizable interface and comes with a dyna

Jan 6, 2023
Owner
Fumiya A
you cant hide from me...
Fumiya A
Journeys is a django based community-focused website that allows users to bookmark URLs (through chrome extension) and share their journeys through timelines.

Journeys is a django based community-focused website that allows users to bookmark URLs (through chrome extension) and share their journeys through timelines. A timeline is a collection of links that share a common topic or a journey of building and learning something new. Users can create timelines, share them publicly, and explore resources.

Students' Web Committee 14 Jun 13, 2022
Using a RPI 3b+ to create a PT camera accessible through Windows browser and controllable through MQTT

web-camera_PT A Web flask server converts the MJPEG stream from RPI to JPG img using opencv, then display in browser. Controls added to move Camera in

null 11 Dec 20, 2022
Piccloud is a full-stack (Angular & Spring Boot) online image clipboard that lets you share images over the internet by generating a unique URL. Others can access the image via this URL.

Piccloud Piccloud is a full-stack application built with Angular & Spring Boot. It is an online image clipboard that lets you share images over the in

Olayinka Atobiloye 3 Dec 15, 2022
Chrome Extension to learn English through subtitles while watching YouTube.

Super-Subtitles Chrome Extension to learn English through Subtitles while watching YouTube How does it helps Non-native English speakers often tend to

null 6 Nov 11, 2022
Browser extension to copy the page title and URL as rich text.

Copy Rich Link Browser extension to copy the page title and URL as rich text. Useful for pasting links to Slack, Google Docs, etc. Usage Install Insta

Ryo Nakamura 19 Dec 17, 2022
Meogic-tab-manager is an extensible, headless JavaScript tab manager framework.

MeogicTabManager English document MeogicTabManager是一个有可拓展性的、headless的JavaScript标签页管理框架。 MeogicTabManager旨在提供可自由组装页面框架、自定义页面组件、甚至覆盖框架自带事件响应的开发体验。 Meogi

meogic-tech 5 Oct 8, 2022
Headless UI components without writing a single line of JavaScript.

Zerolines.js Headless UI components without writing a single line of JavaScript. See Oficial Site: Zerolines.js Components Tab Modal Dropdown Drawer O

null 8 Sep 29, 2022
Tools for Dump NUXT JS Environment Config Through Browser Window Object

Introduction Nuxt JS is an open source javascript framework making web development simple and powerful. This tool is used to get environment configura

Agus Setya R 7 Sep 5, 2022
Next-gen mobile first analytics server (think Mixpanel, Google Analytics) with built-in encryption supporting HTTP2 and gRPC. Node.js, headless, API-only, horizontally scaleable.

Introduction to Awacs Next-gen behavior analysis server (think Mixpanel, Google Analytics) with built-in encryption supporting HTTP2 and gRPC. Node.js

Socketkit 52 Dec 19, 2022
Gatsby-blog-cosmicjs - 🚀⚡️ Blazing fast blog built with Gatsby and the Cosmic Headless CMS 🔥

Gatsby + Cosmic This repo contains an example blog website that is built with Gatsby, and Cosmic. See live demo hosted on Netlify Uses the Cosmic Gats

Priya Chakraborty 0 Jan 29, 2022