Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
try to scraping with linebot
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Gin
February 13, 2020
Technology
1
290
try to scraping with linebot
Gin
February 13, 2020
Tweet
Share
More Decks by Gin
See All by Gin
Cで理解するソケットプログラミング
gin2525
0
530
論理と感覚
gin2525
0
260
Other Decks in Technology
See All in Technology
OpenClawで回す組織運営
jacopen
3
680
Claude Code Skills 勉強会 (DevelersIO向けに調整済み) / claude code skills for devio
masahirokawahara
1
13k
20260311 技術SWG活動報告(デジタルアイデンティティ人材育成推進WG Ph2 活動報告会)
oidfj
0
270
Agentic Software Modernization - Back to the Roots (Zürich Agentic Coding and Architectures, März 2026)
feststelltaste
1
240
楽しく学ぼう!コミュニティ入門 AWSと人が つむいできたストーリー
hiroramos4
PRO
1
180
組織全体で実現する標準監視設計
yuobayashi
2
470
僕、S3 シンプルって名前だけど全然シンプルじゃありません よろしくお願いします
yama3133
1
180
DevOpsエージェントで実現する!! AWS Well-Architected(W-A) を実現するシステム設計 / 20260307 Masaki Okuda
shift_evolve
PRO
3
490
us-east-1 に障害が起きた時に、 ap-northeast-1 にどんな影響があるか 説明できるようになろう!
miu_crescent
PRO
13
4.1k
Kubernetesにおける推論基盤
ry
1
280
脳内メモリ、思ったより揮発性だった
koutorino
0
100
メタデータ同期に潜んでいた問題 〜 Cache Stampede 時の Cycle Wait を⾒つけた話
lycorptech_jp
PRO
0
160
Featured
See All Featured
Exploring anti-patterns in Rails
aemeredith
2
290
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
330
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
1.9k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.3k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Visualization
eitanlees
150
17k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
310
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
120
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
BBQ
matthewcrist
89
10k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Transcript
LINEBOT With Scraping twitter : @gin2_5 Created at 2020/02
ࣗݾհ ֶੜʢ̎̍ࡀʣ LINE FUKUOKAʹ ɹɹɹɹɹظΠϯλʔϯ AI, IoT(ϥζύΠ) ,Java ɹɹɹɹɹɹͲΕ࠳தɻ ࢿ֨ɿԠ༻ใٕज़ऀ
࠷ۙɺ ػցֶशͷֶश ΛαϘͬͯ·͢ɻ ࣜʹർΕ·ͨ͠ɻ ॏճؼͰଉΕͰ͢ɻ
Կ͔ɺଉൈ͖Ͱ ؔ࿈͋Δ͜ͱ͍ͨ͠ͳɻ
εΫϨΠϐϯάͬͯ ໘നͦ͏ɻ
ҰԠɺεΫϨΠϐϯάʹ͍ͭͯ “ WebεΫϨΠϐϯάͱɺWebαΠτ͔Β WebϖʔδͷHTMLσʔλΛऩूͯ͠ɺಛ ఆͷσʔλΛநग़ɺܗ͢͜͠ͱͰ͋Δ ” (weblio ༷ΑΓҾ༻)
HTML File Python Something (DB,File, and more) Scrape Output About
scraping
Α͘ɺ͜Μͳ͜ͱ͋Γ·ͤΜ͔ʁ ໘നͦ͏ͳITܥͷΠϕϯτΛݟಀͪ͠Όͬͨɻ ؾ͍ͨΒɺఆһ͍ͬͺ͍ɻ ʢओʹͰ͢ʣ
࡞Γ·ͨ͠ LINEͰΠϕϯτΛ ௨ɾݕࡧͯ͘͠ΕΔౕ
heroku ߏ DB LINE API Flask python cron (ఆظతʹಈ͘) python
Connpassͷ ެࣜαΠτ (HTMLϑΝΠϧ)
݁ߏ؆୯ʹεΫϨΠϐϯάग़དྷͪΌ͍·ͨ͠ $ pip install beautifulsoup4 from bs4 import BeautifulSoup import
requests bash scrape.py Install Import
url = ’https:!//something.com' r = requests.get(url) soup = BeautifulSoup(r.content, "html.parser")
events_name = soup.select('a.url.summary') events_date = soup.select('p.date') events_year = soup.select('p.year') events_img = soup.select('p.event_thumbnail img') scrape.py
ͨͩɺਅ໘ͳɻ Web APIΛ͍ͬͯΔΘ͚Ͱͳ͍ͷͰɺ ϖʔδͷߏΛม͑ΒΕͨΒɺऴΘΓ·͢ɻ ࣗવݴޠॲཧͱ͔བྷΊͯͬͯΈ͍ͨͳ
͓͠·͍ɻ ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ
None
!<- ͜Εɺ શ֯ʮzʴhʯ Ͱೖྗग़དྷ·͢ ͓·͚