aboutsummaryrefslogtreecommitdiffstats
path: root/fetch-scraper-sources
blob: e97e4187914de67c06fade976e454b047a7f7996 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

# Should find quicker way to find scrapers
scrapers="$( (
    GET https://scraperwiki.com/tags/postjournal
    GET https://scraperwiki.com/tags/postjournal?page=2
    GET https://scraperwiki.com/tags/postjournal?page=3
    GET https://scraperwiki.com/tags/postjournal?page=4
) | grep owner | rev | cut -d/ -f3 | rev)"

mkdir -p scrapersources
for scraper in $scrapers; do
    echo "Fetching source for $scraper"
    GET "https://scraperwiki.com/editor/raw/$scraper" > "scrapersources/$scraper"
done