이쿠의 슬기로운 개발생활

함께 성장하기 위한 보안 개발자 EverNote 내용 공유

코딩/GoLang

Golang web crawling 분석

이쿠우우 2021. 5. 26. 20:05
반응형

 

 

 

Golang web crawling 분석

 

 

GoLang에서 사용가능한 Crawling 라이브러리 목록

 

브라우저 없이 사용

Colly : https://github.com/gocolly/colly

Goquery : github.com/PuerkitoBio/goquery

 

브라우저 사용

Webdriver : https://github.com/fedesog/webdriver

Selenium : https://github.com/tebeka/selenium

 

 

 

 

브라우저 사용 라이브러리 조합 예시

 

Selenium 라이브러리

Web browser 자동화 라이브러리로

웹 드라이버를 사용해서 웹 페이지를 동적크롤링 할 수 있음. 

크롤링 결과의 특정 html 엘리먼트에 마우스 클릭를 발생시키거나, 

input 엘리먼트에 텍스트를 채워넣기 등이 가능함.

 

Gecko 엔진

Gecko는 Web browser engine으로 Mozilla Foundation 및 Mozilla Corporation에서 개발 한 응용 프로그램.

GeckoDriver는 Firefox 브라우저에 대한 Web browser engine임.

 

[Web browser engine이란?]

Web browser engine은 소프트웨어 프로그램으로, 

HTML, XML, Image 및 정보 형식 CSS를 수집하고 이를 형식화 된 콘텐츠를 화면에 표시하는 것. 

Chrome, Firefox, Explorer 등 각 browser들 모두 Web browser engine을 가지고 있음.

 

[Web browser와 Web browser engine ]

Chrome : Blink

Firefox : Gecko

Explorer : Trident

Safari : WebKit

 

 

 

 


 

 

참고

go web crawling 라이브러리

https://gregtczap.com/blog/golang-scraping-strategies-frameworks/

 

selenium 

https://www.selenium.dev/documentation/ko/

https://github.com/tebeka/selenium

https://pkg.go.dev/github.com/tebeka/selenium

 

geckodriver 설치 링크 

https://github.com/mozilla/geckodriver/releases

 

selenium, geckodriver, firefox 예제코드 

https://gist.github.com/jacoduplessis/322d695d4cdab6ce866b939964588642

 

selenium webdriver 예제

https://anifilm.github.io/golang-selenium/

 

webdriver 란

https://leo-bb.tistory.com/37

 

 

 

 

 

반응형

'코딩 > GoLang' 카테고리의 다른 글

Golang gtest  (0) 2022.01.02
golang vscode args 전달 방법  (0) 2022.01.02
godoc  (0) 2021.12.25
Golang race flag (-race)  (0) 2021.12.25
GoLang 개념  (0) 2020.12.04