wscraper icon indicating copy to clipboard operation
wscraper copied to clipboard

Is there a way to add new paths during the parse script ?

Open nvdnkpr opened this issue 11 years ago • 1 comments

Can we add a reference to 'paths' into the vm sandbox ?

nvdnkpr avatar Aug 31 '14 11:08 nvdnkpr

I am not sure if should add a pull-request but made the following changes: https://github.com/janober/wscraper/commit/29cf7c54e837d05fafd6a9869ebb146ce560f0b4

So now it is possible to use whatever you want in the parser. Like for example the following: ''' var modules = {console: console, whatEver: whatEver}; scraper.run(html, parseScript, modules); '''

Now you can use "whatEver" and also for exampe "console.log".

janober avatar Jan 04 '15 07:01 janober