hrbrmstr / htmlunit

🕸🧰☕️Tools to Scrape Dynamic Web Content via the 'HtmlUnit' Java Library
Apache License 2.0
37 stars 6 forks source link

In hu_read_html(), fix wc$getPage input: test_url --> url #2

Closed SteadyGiant closed 5 years ago

SteadyGiant commented 5 years ago

Line 83 of hu_read_html() used to take test_url as input. I think this was meant to take url as input.

After installing htmlunit and htmlunitjars, whenever I call hu_read_html() with any input other than a test_url object, it throws the following:

Error in wc$getPage(test_url) : object 'test_url' not found

E.g.,

library(htmlunit)
home_url = 'https://hrbrmstr.github.io/htmlunitjars/index.htm'
pg = pg <- hu_read_html(home_url)
SteadyGiant commented 5 years ago

I just installed my branch of htmlunits and tried hu_read_html(home_url) with another URL. It worked.

hrbrmstr commented 5 years ago

Aye. #ty. Can you also add yourself to the DESCRIPTION as a ctb?

SteadyGiant commented 5 years ago

Sure thing. Thanks.

I think I did that right. Lmk if not. This is something like my 2nd PR ever.

hrbrmstr commented 5 years ago

tis perfect! #ty again!