Import to ReactJs
nxvinh222 opened this issue · 4 comments
Hello @nxvinh222 you should propbably check out how I did to inject artoo in PhantomJS for instance: https://github.com/medialab/sandcrawler/blob/master/phantom/bindings.js#L59-L90. This should be close to what you want to achieve. Note that artoo was born at a time where packaging JS code wasn't even a thing, so it might be a bit hairy to adapt to newer schemes.
@Yomguithereal wow thank you for your answer.
I'm trying to make a scrape chrome extension and I'm wondering should I run the scrape step via the API to my server(using Scrappy, Puppeteer) or run it directly in the browser(artoo, jQuery). Can you give me some advice, thank you so much.
It depends on so much that I cannot give you a proper answer. I would say that if you need to scrape things as they appear on the user's screen you should probably do so on the client side. This is even more true if you are scraping pages where you need to authenticate or perform complex interactions or interact with complex public-facing APIs.
@Yomguithereal Thank you so much, I appreciate your guidance.