20171105_getOshareFromInstagram.sh

kanata, 2017/11/05 16:08

ダウンロード (597 Bytes)

 
1
#!/bin/bash
2

    
3
# オシャレ測定コマンド
4

    
5
while [ "$1" != "" ]
6
do
7
  # instagramからお洒落ポイントを取得
8
  #POINT=`curl -s curl -s https://www.instagram.com/explore/tags/${1}/|tr ',' '\n'|grep count|grep entry_data|awk -F':' '{print $NF}'`
9
  POINT=`curl -s https://www.instagram.com/explore/tags/${1}/|tr ',' '\n'|grep count\" |grep -v likes|grep -v comments|cut -d' ' -f3`
10
  # 表示位置調整のための小細工
11
  if [ `echo "${1}"|wc -m` -le 4 ]
12
  then
13
    WORD="${1} "
14
  else
15
    WORD="${1}"
16
  fi
17
  printf "%.15s\t%'10d osare\n" "${WORD}" "${POINT}"
18
  shift
19
done
20

    
21
exit 0
クリップボードから画像を追加 (サイズの上限: 100 MB)