Skip to content

Commit

Permalink
Merge pull request #2 from VitoVan/patch-2
Browse files Browse the repository at this point in the history
upgrade protocol from `http` to `https`
  • Loading branch information
Shawyeok authored Aug 22, 2021
2 parents a04889c + be78d7f commit a6a76cb
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 --max-time 5 -sSLG "http://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 a6a76cb

Please sign in to comment.