anaskhan96 / soup

Web Scraper in Go, similar to BeautifulSoup
MIT License
2.18k stars 168 forks source link

Errors lowercase and Get with provided HTTP client #16

Closed Salmondx closed 6 years ago

Salmondx commented 6 years ago

Hi! I've made a couple of small fixes. According to my day to day use cases, it will be great if it'll be possible to use a provided HTTP Client to get an HTML page (without a boilerplate in custom functions). I think that this fix will be great because while scrapping a site using an html parser it is a common situation when you can get an IP ban, so you have to use a Socks5 or other proxies. And to use this proxies you have to write and use a multiple custom HTTP clients.

Also I've changed error messages text to lowercase, according to golang best practices (in stdlib): https://blog.golang.org/error-handling-and-go

anaskhan96 commented 6 years ago

A custom HTTP client is something that should have occurred to me before. Thank you for the PR.