Upgrade to Pro — share decks privately, control downloads, hide ads and more …

headless chromeでRPA(?) - #IoTLT の管理自動化 #RPALT

n0bisuke
May 09, 2018

headless chromeでRPA(?) - #IoTLT の管理自動化 #RPALT

n0bisuke

May 09, 2018
Tweet

More Decks by n0bisuke

Other Decks in Science

Transcript

  1. @n0bisuke
    headless ChromeͰRPA? - IoTLT
    #RPALT
    2018/5/9

    View full-size slide

  2. ੁݪ ͷͼ͚͢
    dotstudio, Inc.
    ɾWeb Engineer
    ɾfrom Iwate / Miyagi
    ɾMicrosoft MVP (Node.js)
    ɾLINE API Expert (ࠃ಺5ਓ/ੈք22ਓ)
    ɾσδλϧϋϦ΢ουେֶେֶӃ ඇৗۈߨࢣ
    ɾIoTLT ओ࠵
    nobisuke sugawara

    View full-size slide

  3. dotstudio, inc.
    ཧ೦ : Ϟϊͮ͘ΓΛָ͠ΉਓΛ૿΍͢
    2016೥૑ۀ

    View full-size slide

  4. IoTʹؔ͢Δतۀɾݚम / ॳ৺ऀ޲͚σόΠεఏڙͳͲͳͲ

    View full-size slide

  5. ※աڈͷLTͷϦϝΠΫͰ͢ɻ
    IoTLT vol32 at αϙʔλʔζ / https://speakerdeck.com/n0bisuke/iotltfalseguan-li-
    woiothua-tupokusiteiruhua-number-iotlt

    View full-size slide

  6. Πϕϯτओ࠵ऀ͋Δ͋ΔͳਏΈ

    View full-size slide

  7. Πϕϯτओ࠵ऀ͋Δ͋ΔͳਏΈ
    ൃදऀूΊ

    View full-size slide

  8. Πϕϯτओ࠵ऀ͋Δ͋ΔͳਏΈ
    ൃදऀूΊ
    ൃදऀͷ؅ཧ

    View full-size slide

  9. Πϕϯτओ࠵ऀ͋Δ͋ΔͳਏΈ
    ൃදऀूΊ
    ൃදऀͷ؅ཧ

    View full-size slide

  10. IoTLT - ࠃ಺࠷େͷIoTίϛϡχςΟ
    ɾconnpass಺1Ґ(ͩͬͨ) - 6538ਓ
    ɾຖ݄։࠵͍ͯ͠ΔLTձ
    ɾ஍ํ։࠵΍εϐϯΦϑ΋ଟ਺
    - ΤϯλʔϓϥΠζɺSIerɺϔϧεέΞɺVUIͳͲ

    View full-size slide

  11. IoTLTͷొஃืू
    facebookάϧʔϓͷίϝϯτͰ౤ߘΛूΊΔ

    View full-size slide

  12. ൃදऀ؅ཧͷਏ͞ͷਅ਷

    View full-size slide

  13. ൃදऀ؅ཧͷਏ͞ͷਅ਷
    ొஃऀ͔Βͷൃද৘ใͷ
    ߋ৽࡞ۀ

    View full-size slide

  14. IoTLTͷొஃऀืूϑϩʔ(ੲ)

    View full-size slide

  15. ͜Ε͕͚ͬ͜͏໘౗

    View full-size slide

  16. ͜Ε͕͚ͬ͜͏໘౗
    ʮ΍ͬͺΓ͜ͷλΠτϧͰʂʯ
    ʮൃදॱ൪ม͑ͯཉ͍͠ʂʯ
    ʮॴଐม͑ͯཉ͍͠ʂʯ
    ߋ৽λΠϛϯά͕Ήͣ

    View full-size slide

  17. ࠷ۙ͸ొஃऀʹ
    GoogleεϓϨοτγʔτʹߋ৽ͯ͠΋Β͍ͬͯΔ

    View full-size slide

  18. ࠷ۙ͸ొஃऀʹ
    GoogleεϓϨοτγʔτʹߋ৽ͯ͠΋Β͍ͬͯΔ
    ͜ΕͰ͍ͩͿָʹͳͬͨɻࣗ༝ʹॻ͍ͯͶʙ

    View full-size slide

  19. ͚Ͳ·ͩ໘౗
    εϓϨοτγʔτ -> connpass(MD)ม׵
    ݁ہͲ͔͜ͷλΠϛϯάͰ࠶౓ߋ৽͕ඞཁ

    View full-size slide

  20. ݁ՌԿ͕ى͖Δ͔

    View full-size slide

  21. ։࠵Ұिؒલ

    View full-size slide

  22. ։࠵Ұिؒલ
    ֎͔ΒݟΔͱ
    ͍ͭ·Ͱ΋
    ొஃऀ͕ू·Βͳ͍
    ҋͷLTձ

    View full-size slide

  23. ͱ͍͏͜ͱͰࣗಈԽ

    View full-size slide

  24. ΍Γ͍ͨ͜ͱΠϝʔδ

    View full-size slide

  25. ΍Γ͍ͨ͜ͱΠϝʔδ
    ͜͜ͷෆఆظߋ৽࡞ۀΛ
    ࣗಈԽͯ͠ఆظߋ৽ʹ

    View full-size slide

  26. API͕͋Δ
    API͸GETͷΈ
    POST͕ͳ͍

    View full-size slide

  27. API͕͋Δ
    API͸GETͷΈ
    POST͕ͳ͍
    શͯAPIͰͷࣗಈԽ͸ݫ͍͠

    View full-size slide

  28. Google Chrome v59~ ϔουϨεϞʔυରԠ

    View full-size slide

  29. ϔουϨεϞʔυ?
    ɾίϚϯυϥΠϯ࣮ߦ
    ɾϓϩάϥϜ͔ΒChrome੍ޚ
    - ϑΥʔϜೖྗΤϛϡϨʔτ
    - DOMཁૉΞΫηε
    - εΫϨΠϐϯά
    ɾWebͳਓʹ͸͔ͳΓྑ͞Έ

    View full-size slide

  30. ϥΠϒϥϦݕ౼

    View full-size slide

  31. શͯRPA(?)ʹ͸͠ͳ͍
    ɾεϓϨοτγʔτ͸APIͪΌΜͱ͋Δ
    ͷͰͦ͜͸APIͰॲཧ
    ɾݫ͍͠ͱ͜ΖΛheadless chromeʹ
    ɾ҆ఆੑ૿͠·͢

    View full-size slide

  32. ͪͳΈʹશ෦JavaScriptͰ
    ɾSSΞΫηε
    ɾpuppeteer
    ɾRaspberry Pi <-> NFC
    ɾLINE BOT
    JS(Node.js)޿ൣғΧόʔͰ͖͍͍ͯΑʔ

    View full-size slide

  33. ίʔυ΋ׂͱγϯϓϧ
    URLʹΞΫηεͯ͠εΫγϣࡱӨͯ͠อଘ͢Δ΍ͭ

    View full-size slide

  34. ͜ΕͰະఆ๷ࢭ..!

    View full-size slide

  35. ݁Ռ…
    ࣗ෼͕͍Εͳ͍ͱ׼

    View full-size slide

  36. ࣗಈԽ͸ָ͍͠
    ɾۀ຿ϑϩʔվળ΍ΊΜͲ͘͞͞΋͋Δ
    ͚ͲͦΕΛ࡞Δ͜ͱࣗମʹײಈ͕͋Δ
    ɾઌੜతͳ͋ΕʮRPAͰ͸͡ΊΔϓϩά
    ϥϛϯάೖ໳ʯͱ͔اըͯ͠ΈΑ͏ͱࢥͬ
    ͯΔΜͰ͚͢ͲͲ͏Ͱ͠ΐʁ

    View full-size slide

  37. ·ͱΊ
    ɾΠϕϯτϖʔδࣗಈߋ৽
    ɾNode.js / headless Chrome / puppeteer
    ɾAPI͕ແ͍৔߹΋ແཧ΍Γܨ͛ΒΕΔ
    ɾࣗಈԽͷ࢓૊Έ࡞ͬͯ΋LTλΠτϧ௚લ·Ͱ
    ܾ·Βͳ͍ਓ()ʹ͸ແҙຯ͔…
    ɾRPA͸Ϟϊͮ͘Γ࢝ΊΔ͖͔͚ͬʹͳΔ͔?

    View full-size slide