Skip to content

Instantly share code, notes, and snippets.

View vlad-shatskyi's full-sized avatar

Volodymyr Shatskyi vlad-shatskyi

View GitHub Profile
module Scraper::BookingCom
class RoomBot < BotBase
include Scraper::ScrapingCommon
HTTP_RESPONSE_VALIDATORS = [
:nil_response, :status_404, :status_200, :html,
->(url, resp) { raise(CustomExceptions::InvalidUrlError, url) if resp.uri.path.include?("searchresults") }
]
def scrape
module Scraper::BookingCom
class RoomBot < BotBase
include Scraper::ScrapingCommon
HTTP_RESPONSE_VALIDATORS = [
:nil_response, :status_404, :status_200, :html,
->(url, resp) { raise(CustomExceptions::InvalidUrlError, url) if resp.uri.path.include?("searchresults") }
]
def scrape