Skip to content

Instantly share code, notes, and snippets.

@cquest
Created April 8, 2018 17:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cquest/92cd47d32fc556306d3cc83357fc1a01 to your computer and use it in GitHub Desktop.
Save cquest/92cd47d32fc556306d3cc83357fc1a01 to your computer and use it in GitHub Desktop.
Script de récupération des URL collectés à l'aide de scoop.it
# Script de récupération des URL des contenus collecté dans scoop.it
#
# Usage: sh descoopit.sh url_scoopit nb_pages
#
# Exemple: sh descoopit.sh https://www.scoop.it/u/open-data-france/ 3 > odf.txt
#
# Dépendances: curl, jq, grep, sed
for p in `seq 1 $2`
do
curl "$1/ajaxGetLastPublishedPosts?showPaginator=true&page=$p&view=json&listId=curatedPostsTab" -s \
| jq .js_inner_replace.html -r \
| grep postTitleView \
| sed 's!.*href="!!;s!".*$!!'
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment