tohshige / test

test private
0 stars 0 forks source link

Web Scraping | オペレーションの自動化 #17

Open tohshige opened 6 years ago

tohshige commented 6 years ago

検証: 自動ログイン>該当ページのリンクを辿る>ボタンを押すとか

Chrome Headress Mode (ChromeをGUI起動せずに操作する) Puppeteer (スクレイピングモジュールの一つ)

Puppeteer and Chrome Headless for Web Scraping

Headress+Puppeteer

tohshige commented 6 years ago

MAC&Rlogin :OK Ylogin:これからスクリプト書く

Windows:未確認

https://www.dropbox.com/s/mgcr9owwzsd9mt5/12%E6%9C%88-15-2017%2016-06-26.mp4?dl=0 headless を一旦無効GUIを表示ONで確認 Macで実行

サービスとして常時起動であれば Nodejsが動くサーバーが必要 とりあえず後で準備やら多分AWSかGcloudで、Sakuraは未対応

tohshige commented 6 years ago

linux@gcloud chrome headless をGUIを表示ONで自動loginを確認 image commit log & SS https://github.com/tohshige/ryLogin/commit/1b7cc46e558fb990f2126483c11f32281785c07e#diff-611b499da98f9ddd3eb860dac378a621

tohshige commented 6 years ago

set up for linux centos7 puppeteer node_modules/puppeteer/ の パーミッション変更、その他Linux Font、Libx系などのインストール https://github.com/GoogleChrome/puppeteer/issues/391#issuecomment-329137874

tohshige commented 6 years ago

Fixed : Chrome Headless doesn't launch https://github.com/Googlechrome/puppeteer/issues/290#issuecomment-322921352 const browser = await puppeteer.launch({ args: [ '--no-sandbox', '--disable-setuid-sandbox'] });