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

Blogcardを表示するための スクレイピングサーバーを 作ってみる/edo-blogcard-backend-is-karakuri

Blogcardを表示するための スクレイピングサーバーを 作ってみる/edo-blogcard-backend-is-karakuri

Kenichiro Kishida

June 08, 2019
Tweet

More Decks by Kenichiro Kishida

Other Decks in Technology

Transcript

  1. #MPHDBSEΛදࣔ͢ΔͨΊͷ
    εΫϨΠϐϯάαʔόʔΛ
    ࡞ͬͯΈΔ
    *54߹॓
    ,FOJDIJSP,JTIJEB
    !TJ[VIJLP

    View full-size slide

  2. ,FOJDIJSP,JTIJEB
    5PLZP +"1"/
    TJ[VIJLP!HNBJMDPN !TJ[VIJLP
    IUUQTHJUIVCDPNTJ[VIJLP
    IUUQCMPHPQFOUPLZPKQ

    View full-size slide

  3. XmlHttpRequest ?

    View full-size slide

  4. w௥Ճͷ)551ϔομʔΛ࢖ͬͯɺ͋ΔΦϦ
    δϯ υϝΠϯ
    Ͱಈ͍͍ͯΔ΢ΣϒΞϓϦ
    έʔγϣϯ͕ɺҟͳΔΦϦδϯͷαʔόʔ
    ʹΞΫηεͰ͖ΔΑ͏ʹ͢Δ࢓૊Έ
    wࣗ෼ͷΦϦδϯͱ͸ҟͳΔΦϦδϯͷϦιʔ
    εΛϦΫΤετ͢Δͱ͖ɺΦϦδϯؒ
    )551ϦΫΤετΛ࣮ߦ͠·͢
    wηΩϡϦςΟ্ͷཧ༝͔Βɺϒϥ΢βʔ͸ɺ
    εΫϦϓτ͕։࢝ͨ͠ΦϦδϯؒ)551
    ϦΫΤετΛ੍ݶ͍ͯ͠·͢
    $034
    https://developer.mozilla.org/ja/docs/Web/HTTP/CORS

    View full-size slide

  5. XmlHttpRequest
    with

    API KEY
    HttpRequest

    View full-size slide

  6. w0SJHJO͝ͱͷ"1*ΩʔͰ੍ݶ
    w1VQQFUFFS )FBEMFTT$ISPNF

    w/PEFKTWY
    wPHUJUMFccUJUMFccI<>

    PHJNBHFccJNH<>

    PHEFTDccNFUBEFTDccCPEZ
    UFYU

    'FBUVSF

    View full-size slide

  7. XmlHttpRequest
    with

    API KEY
    HttpRequest
    4FSWJDF*NBHF
    Cache
    Firewall

    View full-size slide

  8. 6TF5IF1MBUGPSN

    View full-size slide

  9. WJTJUNZCMPHHJUIVC
    https://github.com/sizuhiko
    http://blog.open.tokyo.jp

    View full-size slide