Skip to content

Instantly share code, notes, and snippets.

@lae
Created December 17, 2017 20:26
Show Gist options
  • Save lae/6219284b479108ad8826c5f4b95894f1 to your computer and use it in GitHub Desktop.
Save lae/6219284b479108ad8826c5f4b95894f1 to your computer and use it in GitHub Desktop.
i=0; ls data/js/tweets/*.js | while read; do sed /Grailbird/d $REPLY; done | sed -r 's/^} \] ?\[ \{/}, \{/g' | jq -r '.[] | select(.retweeted_status == null) | select (.entities.media != []) | .entities.media[] | .expanded_url + " " + .media_url_https' | while read tweet image; do id=$(printf $tweet | cut -d/ -f6); filename=$(printf $image | cut -d/ -f5); wget -O data/images/$id-$filename $image:orig& sleep 0.1; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment