Skip to content

Commit

Permalink
Merge branch 'master' into patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawyeok authored Aug 22, 2021
2 parents c4520db + a04889c commit be78d7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if [ $# -eq 0 ]; then
fi

query="$@"
curl -sSLG "https://cn.bing.com/dict/search" --data-urlencode "q=$query" |\
curl --max-time 5 -sSLG "https://cn.bing.com/dict/search" --data-urlencode "q=$query" |\
grep -Eo '<meta name="description" content="(.+) " ?/>' |\
sed -E 's/<meta name="description" content="必应词典为您提供.+的释义,(.+)" ?\/>/\1/' |\
sed -E 's/(.*)(,)(.*)/\1 \3/' | awk -v "QUERY=$query" '{
Expand Down

0 comments on commit be78d7f

Please sign in to comment.