Giter VIP home page Giter VIP logo

instagram_crawler's Introduction

Scrapyを利用したInstagramのクローリング

クローラーで出そうなこと、やりたいこと。

  • 特定のハッシュタグでの検索。
    • イベントに興味を持っている人、参加者の特定。
    • 画像はいらない。
    • 投稿しているユーザーの情報は欲しい。
      • フォロワー・フォロー(数も)
      • いいねをしているユーザー
  • 特定のユーザーの投稿を取得
    • 画像のダウンロード
    • ユーザーの興味を持っているフォロワー
      • いいねを積極的にしている。
      • メッセージを頻繁に送っている。

Spiderの説明

  • getUserData:ユーザーの投稿数・フォロー数・フォロワー数の取得

実行

Dockerの使い方

  • コンテナの作成・起動
$ docker run -d --name insta_splash -it -p 8050:8050 scrapinghub/splash
  • コンテナ起動
$ docker start insta_splash
  • コンテナの停止
$ docker stop insta_splash

クローラーの実行

  • ユーザーデータのこクロール
$ scrapy crawl getUserData
  • splash-scrapyを使った$ scrapy shellの実行
scrapy shell '{SPLASH_URL}/render.html?url={クロールしたいURL}/&timeout=10&wait=0.5'

SPLASH_URLはsplash-scrapyコンテナの起動時に取得できる。

欲しいデータ

  • ユーザーから探す
    • ユーザー名
    • フォロワー数
    • 投稿ごとのいいね数
    • 投稿数

インスタの影響力が強い傾向があるユーザー特徴

  • 投稿の世界観が統一されている。

    • 同じフィルター
  • PR投稿をしている人は信用をなくしていく。( #pr )

  • 企業が求めるインフルエンサーイメージ  - 世界観に統一がある

    • そこそこフォロワー数の見栄えがいい
    • 過去に#PRをしていない
  • インスタは類似性が出るのはフォローしている人の方の可能性もある。

  • 過去の#pr投稿を何回行なっているのか。

instagram_crawler's People

Watchers

James Cloos avatar Kyoppii avatar

Forkers

tatsuyasatou

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.