node-horseman icon indicating copy to clipboard operation
node-horseman copied to clipboard

jQuery detect false-positive

Open jturner869 opened this issue 7 years ago • 2 comments

I'm trying to scrape this web page: https://www.manheim.com/login?WT.svl=m_hdr_gnav_login

When I do this horseman does not load jQuery because it thinks jQuery is already loaded, because the site is already using $ for another function.

At first I thought it would be a good idea to make the jQuery detection more robust by doing a jQuery version lookup and parsing the jQuery name out. However that's problematic because jQuery would simply overwrite that function. SO that functionality is not a good default behavior, which lead me to the thought that horseman should allow a forced jQuery injection without checking to see if it is there, as well as the ability to initiate a force jQuery injection anywhere in the action chain. That way the user can decide if it is appropriate to overwrite the $ function.

jturner869 avatar Jul 11 '17 21:07 jturner869

I would be willing to accept a PR to add "forced" jQuery injection. I am not sure if I'll have time to add it myself.

awlayton avatar Sep 05 '17 16:09 awlayton

I think this would be a great idea. I've never contributed to a GitHub project before, but I'd be happy to work on the feature.

JamesRBrown avatar Sep 06 '17 22:09 JamesRBrown