Skip to content

Instantly share code, notes, and snippets.

@nomoa
Created January 20, 2016 20:16
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 nomoa/93c5097e3c3cb3b6ebad to your computer and use it in GitHub Desktop.
Save nomoa/93c5097e3c3cb3b6ebad to your computer and use it in GitHub Desktop.
PAGE=$1
echo Defaults
curl -s 'https://en.m.wikipedia.org/w/api.php?action=query&format=json&prop=pageterms%7Cpageimages%7Cpageprops&ppprop=mainpage%7Cdisambiguation&wbptterms=description&generator=search&gsrsearch=morelike%3A'$PAGE'&gsrnamespace=0&gsrwhat=text&gsrinfo=&gsrprop=redirecttitle&gsrlimit=5&piprop=thumbnail&pithumbsize=640&pilimit=5&continue=' | jq . | grep "title"
echo =======
echo Opening text (no boost links)
curl -s 'https://en.m.wikipedia.org/w/api.php?action=query&format=json&prop=pageterms%7Cpageimages%7Cpageprops&ppprop=mainpage%7Cdisambiguation&wbptterms=description&generator=search&gsrsearch=morelike%3A'$PAGE'&gsrnamespace=0&gsrwhat=text&gsrinfo=&gsrprop=redirecttitle&gsrlimit=5&piprop=thumbnail&pithumbsize=640&pilimit=5&continue=&cirrusMltUseFields=yes&cirrusMltFields=opening_text&cirrusBoostLinks=no' | jq . | grep "title"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment