#!/bin/bash

set -euo pipefail

for file in $(find $1 -name "*.fec");
do
	curl -s "http://docquery.fec.gov/dcdev/posted/$(basename $file)" | gzip -9 > $2"$(basename $file).gz"
done

#!/bin/bash

set -euo pipefail

for file in $(find $1 -name "*.fec");
do
	curl -s "https://docquery.fec.gov/dcdev/posted/$(basename $file)" | gzip -9 > $2"$(basename $file).gz"
done

Switch FEC URL to HTTPS
Switch FEC URL to HTTPS
