Created
April 8, 2018 17:37
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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