1
2
3
4
5
6
7
8
9
10
11
12
13
import { email } from "https://esm.town/v/std/email";
import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=6";
import { load } from "npm:cheerio";
export default async (interval: Interval) => {
const html = await fetchText(Deno.env.get("rubbish_url"));
const $ = load(html);
const containers = $(".bin-collection-container");
await email({
"subject": "Bin Day",
"html": containers.first().html() + containers.next().html(),
});
};