The little things give you away... A collection of various small helper stuff
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

17 lines
581 B

  1. #!/bin/bash
  2. q="$1"
  3. declare -i max=10000
  4. if [[ $# -eq 2 ]]; then max=$2; fi
  5. {
  6. declare -i first=1
  7. queryStr="q=${q}"
  8. while [[ ${first} -lt ${max} ]]
  9. do
  10. echo "http://www.bing.com/search?${queryStr}" >&2
  11. curl -s -A 'Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0' "http://www.bing.com/search?${queryStr}"
  12. first+=10
  13. queryStr="q=${q}&go=Search&qs=ds&first=${first}&FORM=PORE"
  14. sleep 2
  15. done
  16. } | grep -Po '<li class="b_algo">.*?</li>' | grep -Po 'href="\Khttps?://(?!www\.microsofttranslator\.com/|view\.officeapps\.live\.com/)[^"]+' | awk '!seen[$0]++'