Is it possible to use OpenWebPage from WebUnit in ParallelTable? For example such as in:


pages = {"www.wolfram.com", ... }
  html = GetPageHtml[];
  , {i, Length@pages}

I can start multiple browsing windows by running several StartWebSession[] but then how to dedicate a single window to each core?

  • $\begingroup$ This is a question that I am certain the answer is yes to, having modified the source code for WebUnit for my own purposes at various points, but Arnoud would be best able to answer. Try asking on Wolfram Community as I expect he spends more time there. As a first, clumsy attempt try a ParallelEvaluate[Needs["WebUnit`"];InstallWebUnit[];StartWebSession[]]. I believe you can do all this from a single web session though. $\endgroup$ – b3m2a1 Dec 19 '17 at 0:21
  • $\begingroup$ @b3m2a1 I'll ask. Your solution opens a lot of windows; do you know how to close a browser window? StopWebSession does not and I did not see any similar commands in the doc. $\endgroup$ – anderstood Dec 19 '17 at 16:55
  • $\begingroup$ I can’t remember off the top of my head and don’t have the time to dig now, but I believe if you dig a bit there’s a way to get the process ID which you could kill (I don’t think it uses ProcessObject) or alternately I think there’s a way to tell it to close itself. I certainly have done it but can’t remember how. $\endgroup$ – b3m2a1 Dec 19 '17 at 16:56
  • $\begingroup$ @b3m2a1 OK thank you. Anyway that's probably so much less efficient than a clean approach. I'll update if I get anything interesting. $\endgroup$ – anderstood Dec 19 '17 at 16:59
  • $\begingroup$ Cross-posting : community.wolfram.com/groups/-/m/t/1250232 $\endgroup$ – anderstood Dec 19 '17 at 17:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.