Skip to content

Instantly share code, notes, and snippets.

View matt2718's full-sized avatar

Matt Mitchell matt2718

View GitHub Profile
@matt2718
matt2718 / qb-scrape.sh
Last active June 13, 2017 15:38
Scrape quiz bowl packets
#!/bin/bash
# change these depending on where you want to pull from
# for the hs archive, the URL should be 'http://www.quizbowlpackets.com'
baseurl='http://collegiate.quizbowlpackets.com'
outdir='collegiate'
curl -s $baseurl | # get index page
grep '<SPAN class="Name">' | # extract lines containting packet links
sed -e 's/^.*href="//' -e 's/">/*/' -e 's/<\/a>.*$//' | # parse url and name