Code Monkey home page Code Monkey logo

get-csv-file-from-google-search-results-group's Introduction

Google検索、件数取得

Travis version version
Google検索で、複数ある対象キーワード群から件数のみを取得し、CSVファイルに変化するWEBアプリである

コンテンツの表

インストール

Windows環境

Node.jsからLTS版をダウンロードする。

構築

ディレクトリの移動

このアプリのディレクトリへ移動する

必要パッケージのインストール

npm install

リソースの構築

CSSJavascriptpublic ディレクトリへ構築する。

npm run dev

コンフィグ

env.jsonファイルがコンフィグファイルである。

{
  "server":{
    "port":3000,
    "socketPort":3001,
    "https":{
      "valid":false,
      "key":"D:/www/nodejs/google_keyword_hit_count_csv/resources/ssl/server.key",
      "cert":"D:/www/nodejs/google_keyword_hit_count_csv/resources/ssl/server.crt"
    },
    "serverWebID":"90-pweutrvvcw*PLi"
  },
  "auth":
  {
    "valid":false,
    "username":"admin",
    "password":"pass"
  },
  "maxKeyword":1000,
  "searchInterval":5000,
  "dir":{
    "tmp":"storage/tmp/"
  },
  "filePath":{
    "CSV":"storage/tmp/keyword_result.CSV",
    "keyword":"storage/tmp/keyword.txt",
    "run":"storage/tmp/run.json"
  },
  "file":{
    "CSV":"keyword_result.CSV"
  }
}

最大キー数

maxKeywordは、一度に検索することのできる最大キー数である。

キーの検索間隔

searchIntervalは、一つのキーを検索する毎に待つ時間である。単位はミリセコンドで、1000で一秒を表す。
デフォルトでは、5秒間隔である。

他のパラメーター

上記以外の値を変更することは、今のところおすすめしない。コードを読んで理解できる方はどうぞ。

起動

サーバを起動するためのコマンド

npm start

デフォルトでポート3000番で http://127.0.0.1:3000 でアクセス可能。
このとき、ソケットでポート3001番も使用している。

使い方

キーファイルの用意

例として、キーファイル.txtのファイルの中身が

検索ワード
こんにちは
マグネット 磁石

として、検索したいキーワードごとに改行する。 スペースがAND検索になる

注意:ファイルフォーマットは必ず UTF8 にすること!!

キーフェイルのアップロード

サイトトップで、キーファイルの所に、ファイルをアップロードするフォームがある。 上記例で作成したファイルを、アップロードした瞬間に解析が始まる。

しばらくすると、処理が終了したメッセージが表示され、CSVダウンロードボタンが表示される。
ボタンをクリック後、ダウンロードが開始される。

ライセンス

MIT

get-csv-file-from-google-search-results-group's People

Watchers

 avatar

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.