Skip to content

Instantly share code, notes, and snippets.

@jabez007
Created January 29, 2019 18:05
Show Gist options
  • Save jabez007/f24ed6604904a4826717a1879da3bd8d to your computer and use it in GitHub Desktop.
Save jabez007/f24ed6604904a4826717a1879da3bd8d to your computer and use it in GitHub Desktop.
Scrape the current Daily Programmer challenges
fetch("https://www.reddit.com/r/dailyprogrammer/").then((resp) => resp.text()).then((text) => {
let parser = new DOMParser();
let doc = parser.parseFromString(text, "text/html");
doc.querySelectorAll("a.SQnoC3ObvgnGjWt90zD9Z").forEach((a) => console.log(a.href));})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment