Coding
PromptBeginner5 minmarkdown
Markdown Converter
Agent skill for markdown-converter
40
This is a Node.js web scraper service that fetches US visa bulletin data from the State Department website (travel.state.gov), stores bulletins in a DynamoDB database via Cyclic.sh, and sends email notifications when a target bulletin becomes available.
Sign in to like and favorite skills
This is a Node.js web scraper service that fetches US visa bulletin data from the State Department website (travel.state.gov), stores bulletins in a DynamoDB database via Cyclic.sh, and sends email notifications when a target bulletin becomes available.
Single-file Express application (
index.js, ~100 lines). No subdirectories or modular structure.
GET / triggers the scrapegetBulletins() fetches HTML from travel.state.gov.current elements for bulletin text and linkssave() persists bulletins to DynamoDB via @cyclic.sh/dynamodbgetAll() retrieves all stored bulletinslodash _.find()), send() emails a notification through Gmail SMTPindex.js)getBulletins() — HTTP GET to State Department, returns raw HTMLsave(list) — Writes bulletin array to DynamoDB bulletins collectiongetAll() — Lists and fetches all items from bulletins collectionsend(message) — Sends email via nodemailer/Gmail SMTP| Component | Library |
|---|---|
| Web framework | Express 4.x |
| HTTP client | Axios 1.x |
| HTML parsing | Cheerio 1.x |
| Database | @cyclic.sh/dynamodb (DynamoDB) |
| Nodemailer + SMTP transport | |
| Utilities | Lodash |
npm install
npx nodemon index.js
The server listens on port 3000. Visit
http://localhost:3000/ to trigger a scrape.
There are no tests configured.
npm test exits with an error placeholder.
require() / module.exports)async/await and raw Promises/ ├── index.js # Entire application (entry point, routes, scraping, DB, email) ├── package.json # Dependencies and metadata ├── package-lock.json # Locked dependency versions └── .gitignore # Excludes node_modules/
index.js rather than sourced from environment variablesgetBulletins() silently resolves to undefined on HTTP errorssave() uses .map() with async callbacks without awaiting all promisesgetAll() uses an undeclared loop variable (for (item of ...) — missing const/let)'July2024') is hardcoded