diff --git a/README.MD b/README.MD index d1e4601..bfbcd16 100644 --- a/README.MD +++ b/README.MD @@ -17,8 +17,7 @@ YOU MUST HAVE `websites.csv` FOR ALL ESCRIBE SCRAPERS! ## Scrape eScribe meetings (SCRAPE_MEET.SH) -This bash script will scrape meetings from the eScribe meetings platform. There is a variable set called `SUPPORT_PAST`. If `SUPPORT_PAST="TRUE"`, meetings older than 2 months will be downloaded. Otherwise, they will be skipped. -Don't ask why "TRUE" is a string and not a boolean... +This bash script will scrape meetings from the eScribe meetings platform. There is a variable set called `SUPPORT_PAST`. If `SUPPORT_PAST=1` (true), meetings older than 2 months will be downloaded. Otherwise, they will be skipped. The basic structure of the output files is: ``` @@ -103,4 +102,4 @@ The basic structure of the output files is: |- .pdf |- .pdf \- etc etc -``` \ No newline at end of file +``` diff --git a/SCRAPE_ESCRIBE.SH b/SCRAPE_ESCRIBE.SH index ad97b53..34d3c6d 100644 --- a/SCRAPE_ESCRIBE.SH +++ b/SCRAPE_ESCRIBE.SH @@ -38,18 +38,18 @@ while read -r INDEX_URL_PRE CITY_ARCHIVE_NAME_PRE CALENDAR_NAME_PRE; do CITY_ARCHIVE_NAME=$(echo $CITY_ARCHIVE_NAME_PRE | sed 's/\"//g' | sed 's/\,//g') CALENDAR_NAME=$(echo $CALENDAR_NAME_PRE | sed 's/\"//g' | sed 's/\,//g') - INDEX_END="FALSE" - while [[ $INDEX_END == "FALSE" ]]; do + INDEX_END=0 + while (( ! INDEX_END )); do echo "SCRAPE_ESCRIBE: Downloading eScribe index..." wget --no-check-certificate --user-agent="$WGET_UA" $INDEX_URL -O $INDEX_PAGE --show-progress if [ $? -ne 8 ]; then - FOUNDLIST="FALSE" + FOUNDLIST=0 while IFS= read -r LINE; do - if [[ "TRUE" == $FOUNDLIST ]]; then + if (( FOUNDLIST )); then GREPENDLIST=$(echo $LINE | grep '