Dynamically set base_url and path.
Closed this issue · 2 comments
imnithin commented
This is more of a question,
Would it be possible for to set base_url
and path
dynamically/run time?
felipecsl commented
No, this is not currently possible, sorry.
khacluan commented
you can do it
def crawl(path)
raw_code = <<-CODE
base_url "https://www.github.com"
path "#{path}"
headline xpath: "//h1"
subheading css: "p.alt-lead"
what_is({ css: ".one-fourth h4" }, :list)
CODE
block = ->(c) { eval(raw_code) }
Wombat.crawl &block
end