This is a test.
' + print(BeautifulSoup(html, "html.parser").select_one("p.info").get_text()) + ``` + + Run with [uv](https://docs.astral.sh/uv/) (recommended): + + ```bash theme={null} + uv run scripts/extract.py + ``` + + `uv run` creates an isolated environment, installs the declared dependencies, and runs the script. [pipx](https://pipx.pypa.io/) (`pipx run scripts/extract.py`) also supports PEP 723. + + * Pin versions with [PEP 508](https://peps.python.org/pep-0508/) specifiers: `"beautifulsoup4>=4.12,<5"`. + * Use `requires-python` to constrain the Python version. + * Use `uv lock --script` to create a lockfile for full reproducibility. +This is a test.
`; + const $ = cheerio.load(html); + console.log($("p.info").text()); + ``` + + ```bash theme={null} + deno run scripts/extract.ts + ``` + + * Use `npm:` for npm packages, `jsr:` for Deno-native packages. + * Version specifiers follow semver: `@1.0.0` (exact), `@^1.0.0` (compatible). + * Dependencies are cached globally. Use `--reload` to force re-fetch. + * Packages with native addons (node-gyp) may not work — packages that ship pre-built binaries work best. +This is a test.
`; + const $ = cheerio.load(html); + console.log($("p.info").text()); + ``` + + ```bash theme={null} + bun run scripts/extract.ts + ``` + + * No `package.json` or `node_modules` needed. TypeScript works natively. + * Packages are cached globally. First run downloads; subsequent runs are near-instant. + * If a `node_modules` directory exists anywhere up the directory tree, auto-install is disabled and Bun falls back to standard Node.js resolution. +This is a test.
' + doc = Nokogiri::HTML(html) + puts doc.at_css('p.info').text + ``` + + ```bash theme={null} + ruby scripts/extract.rb + ``` + + * Pin versions explicitly (`gem 'nokogiri', '~> 1.16'`) — there is no lockfile. + * An existing `Gemfile` or `BUNDLE_GEMFILE` env var in the working directory can interfere. +