{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/20"},{"label":"Linguistic","url":"https://skillfed.io/packages/category/text-processing-linguistic/2"},{"label":"General","url":"https://skillfed.io/packages/category/text-processing-general"}],"enrichment":{"capability":"Parses JavaScript objects embedded in HTML or text into Python dictionaries, handling JavaScript syntax that standard JSON parsers reject.","skillfed_tags":["web-scraping","javascript-parsing","json5"],"use_cases":["Extract __NEXT_DATA__ or __PRELOADED_STATE__ from server-rendered web pages during scraping.","Parse JavaScript configuration objects embedded in HTML script tags into Python dicts.","Read JSON Lines files that may contain JavaScript-style syntax variations.","Handle web pages where JSON is embedded with unquoted keys or single quotes instead of double quotes."],"what_it_does":"Chompjs is a JavaScript-to-Python object parser designed for web scraping. It transforms JavaScript objects embedded in HTML pages into valid Python dictionaries, handling syntax that the standard library's json.loads rejects\u2014such as unquoted keys, single-quoted strings, trailing commas, and leading-decimal floats. The library uses a C-based parser to normalize the input, then passes the result to json.loads for final conversion, balancing speed with correctness.\n\nThe package supports JSON5 syntax and offers two main functions: parse_js_object for extracting a single object (raises ValueError on failure) and parse_js_objects as a generator for multiple objects or JSON Lines. It integrates easily into web scrapers and allows custom JSON loaders and loader options to be passed through.","worth_installing":"Yes. Chompjs solves a real web-scraping problem\u2014parsing non-standard JavaScript objects that json.loads cannot handle\u2014with active maintenance, no security vulnerabilities, permissive licensing, and broad platform support. Install friction is moderate but manageable; prebuilt wheels cover modern Python versions and common architectures."},"id":"chompjs","links":{"html":"https://skillfed.io/packages/chompjs","md":"https://skillfed.io/packages/chompjs.md","pypi":"https://pypi.org/project/chompjs/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-05-17","license_spdx":null,"license_treatment":"permissive","name":"chompjs","python_support":"supports_current","summary":"Parsing JavaScript objects into Python dictionaries"},"popularity":{"monthly_downloads":98116,"position":13106,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.4.1"}
