Skip to content

Commit

Permalink
Merge pull request #152 from sdushantha/main
Browse files Browse the repository at this point in the history
added "Learn to pronounce" scraper
  • Loading branch information
Bugswriter authored Feb 25, 2021
2 parents dc71474 + fd52907 commit 03ab53c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tuxi
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ google_html=$(curl -Gs --compressed "$google_url" --user-agent "$user_agent" --d
# Units Convertion
# Currency Convertion
# Translate
# Learn to pronounce
# Knowledge Graph - right

# did you mean ( eg: linux torvalds ) Because we all know his real name is linux, not linus.
Expand Down Expand Up @@ -214,6 +215,10 @@ snipcall "pup 'pre.XcVN5d json{}' | jq -r '[.[] | .children | .[] | select(.clas
# Translate ( eg: Vais para cascais? em ingles )
snipcall "pup 'pre.XcVN5d json{}' | jq -r '[.[] | .children | .[] | select(.class!=\"BCGytf\")][1] | .text' | sed 's/null//g' | recode html..ISO-8859-1"

# Learn to pronounce ( eg: pronounce linux )
pronounce=$(echo "$google_html" | pup "div.fQ02Rb.eDzgme span.seLqNc text{}" | paste -s -d ' ' | sed 's/\s/∙/g')
snipcall "$pronounce"

# Knowledge Graph - right ( eg: the office )
snipcall "pup 'div.kno-rdesc span' | sed -n '2p' | awk '{\$1=\$1;print}' | recode html..ISO-8859-1 | tr ' ' '\0' | xargs -0 -n10"

Expand Down

0 comments on commit 03ab53c

Please sign in to comment.