news-scraper package icon
wasmer/news-scraper
Public
wasmer run wasmer/news-scraper

A web scraper for news headlines on Hacker News

This project is a web scraper for news headlines on Hacker News. It is written in Rust and uses the reqwest and scraper crates.

The objective of this project is to learn compilation and deployment of Rust projects to WASIX and Wasmer Edge.

Usage

Pre-requisites

You must have the following installed on your machine:

Running the project

Running using Wasmer Registry

To run the project from the wasmer/news-scraper package you can simply do:

$ wasmer run wasmer/news-scraper --net --env PORT=3000

Running locally

To run the project, clone the repository and run the following command:

cargo wasix build --release

This will compile the project to WASIX and output the compiled binary to target/wasm32-wasmer-wasi/release/news-scraper.wasm.

To run the compiled binary, run the following command:

wasmer run target/wasm32-wasmer-wasi/release/news-scraper.wasm --net --env PORT=3000

This will run the compiled binary on port 3000. You can then access the web scraper at http://localhost:3000 using curl or a web browser.

Deployment

To deploy the project on wasmer edge simply do:

wasmer deploy

Note: you must change the configurations in wasmer.toml and app.yaml to match your own wasmer profile.

You can also follow the full tutorial for this project here.

Access Link

You can also access the deployed project and read the news from your terminal.

curl https://news-scraper.wasmer.app

Package to showcase a news scraper on wasmer edge

More packages
wasmer/wasmer-hello website
Package to showcase a news scraper on wasmer edge
News Scraper for yCombinator's Hacker News
Rudra
Rudra
Rudra
Rudra
Package to showcase a news scraper on wasmer edge
hackernews web scraping in rust
Saurab Tharu
Saurab Tharu
Saurab Tharu
Saurab Tharu
Package to showcase a news scraper on wasmer edge
Package to showcase a news scraper on wasmer edge
Package to showcase a news scraper on wasmer edge
wasmer-tests/python-scraper py worker
Package to scrape news articles from the hacker news website
Rudra
Rudra
Rudra
Rudra

Making software universally accessible