{"id":20299513,"url":"https://github.com/yuis-ice/jseval","last_synced_at":"2025-04-11T13:15:02.345Z","repository":{"id":49411617,"uuid":"378034436","full_name":"yuis-ice/jseval","owner":"yuis-ice","description":"Evaluate JavaScript on a URL through headless Chrome browser.","archived":false,"fork":false,"pushed_at":"2021-06-18T19:17:51.000Z","size":3,"stargazers_count":25,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T09:47:33.870Z","etag":null,"topics":["browser-automation","cli-utilities","cmdline","command-line","commandline-interface","data-scraping","datascraping","eval","evaluator","headless-browser","headless-browsers","pupeteer","scrapers","scrapper","scrapping","web-browser","web-crawling","web-scrapping","webscrapping","website-scraper"],"latest_commit_sha":null,"homepage":"https://yuis-programming.com/jseval-app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yuis-ice.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-18T04:34:52.000Z","updated_at":"2024-06-03T23:40:09.000Z","dependencies_parsed_at":"2022-09-17T17:20:40.550Z","dependency_job_id":null,"html_url":"https://github.com/yuis-ice/jseval","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuis-ice%2Fjseval","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuis-ice%2Fjseval/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuis-ice%2Fjseval/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuis-ice%2Fjseval/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuis-ice","download_url":"https://codeload.github.com/yuis-ice/jseval/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248406822,"owners_count":21098304,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browser-automation","cli-utilities","cmdline","command-line","commandline-interface","data-scraping","datascraping","eval","evaluator","headless-browser","headless-browsers","pupeteer","scrapers","scrapper","scrapping","web-browser","web-crawling","web-scrapping","webscrapping","website-scraper"],"created_at":"2024-11-14T16:15:03.796Z","updated_at":"2025-04-11T13:15:02.322Z","avatar_url":"https://github.com/yuis-ice.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# jseval\n\nEvaluate JavaScript on a URL through headless Chrome browser.\n\n## build\n\n```\ndocker build -t jseval -f jseval.dockerfile .\n```\n\n## usage\n\n```\ndocker run --rm jseval --help\n```\n\n## quick start\n\nRun:\n\n```\n$ docker run --rm jseval --url \"https://www.tradingview.com/\" --evaluate 'JSON.stringify([document.location.href, document.title])' --headless --output\n```\n\nstdout would be like:\n\n```\n[\"https://www.tradingview.com/\",\"Free Stock Charts, Stock Quotes and Trade Ideas — TradingView\"]\n```\n\n## examples\n\n- for complicated JS\n\n```sh\ndocker run jseval \\\n\t--url \"https://www.tradingview.com/ideas/bitcoin/\" \\\n\t--evaluate \"$(cat \u003c\u003c- EOT\n\t\tJSON.stringify(\n\t\t\tArray.from(\n\t\t\t\tdocument.querySelectorAll(\"div.tv-feed-layout__card-item[data-widget-type=\\\"idea\\\"] \u003e div \u003e div \u003e a\")\n\t\t\t)\n\t\t\t.map(a =\u003e a.href)\n\t\t\t.concat(document.location.href)\n\t\t)\n\tEOT\n\t)\" \\\n\t--headless \\\n\t--output\n```\n\n## help\n\n```\nUsage: jseval [options]\n\nOptions:\n  --url \u003curl\u003e          set url\n  --sleep \u003cseconds\u003e    set sleep (default: 0)\n  --evaluate \u003cscript\u003e  set script to evaluate\n  --output             output to stdout\n  --file \u003cfile\u003e        output to file (default: \"\")     \n  --headless           enables headless (default: false)\n  --log                enables log\n  -h, --help           display help for command\n```\n\n---\n\n```\ntodables\n  just eval js, not console.log as a default\n    should be like: docker run --rm jseval --url \"https://www.tradingview.com/\" --evaluate 'console.log(JSON.stringify([document.location.href, document.title]))' --headless --output\n  should be able to set cookies \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuis-ice%2Fjseval","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuis-ice%2Fjseval","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuis-ice%2Fjseval/lists"}