Skip to content
This repository has been archived by the owner on Aug 14, 2020. It is now read-only.

owruby/instagram-search-images

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instagram API Crawler

Setup

pip install python-instagram

Usage

https://instagram.com/developer/ から

  • client_id
  • client_secret
  • access_token を取得する.

参考サイト http://www.dcrew.jp/ja-instagram-api-doc-v1/, http://iaseteam.eshizuoka.jp/e1237677.html

Search method

  • Search by tags(タグ検索)
  • Search by location(場所検索)

Search by tags(タグ検索)

Description

インスタグラムの#tagのようなタグを含む画像をダウンロードする. ダウンロード情報は以下の内容を,images.csvに記載.

  • origin_url
  • file_name
  • latitude
  • longitude

Usage

  1. 取得したclient_id,client_secret,access_tokenをsearch_insta_tag.py に書き込む.
  2. TAG_NAMEの箇所に検索するタグ名を入力.ENDにダウンロードする画像枚数を設定.
python search_insta_tag.py

で実行

Search by location(場所検索)

Description

(緯度,経度)をもとに,その緯度,経度の周りのlocation_idを取得する. その取得したlocation_idをもとに検索する. images.csvには以下を記載

  • origin_url
  • file_name
  • latitude
  • longtitude
  • location_id

Usage

  1. 取得したclient_id,client_secret,access_tokenをsearch_insta_tag.py に書き込む.
  2. LATに緯度,LOGに経度をいれDISTANCEに,緯度と経度のlocation_idを取得する半径を指定,LOCATION_COUNTに取得するlocation_idの数を指定.

緯度,経度の情報は以下のサイトを参照 http://maihamakyo.org/etc/locastagram/

python search_insta_location.py で実行

Notice

instagram.bind.InstagramClientError: (500) Unable to parse response, not valid JSON.

のようなエラーが発生するときがたまにあるが,気にせずもう1度実行.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages