As it turned out, the web page that I'm trying to translate (e.g. , http://www.abstractsonline.com/pp8/#!/4376/presentation/308) is dynamically generated and its source code merely contains a few lines below and some others in the body
element.
<div class="container content">
<div id="header"></div>
<div id="body"></div>
<div id="footer"></div>
</div>
I don't know exactly what kind of technologies are used here, but I found the following line in the head
element of the html.
script data-main="js/main" src="js/lib/require.js"></script>
When I run doWeb()
while showing up the page of a single entry, the doc
object contains actual page elements, so doWeb()
works fine.
However, when I try to run doWeb()
from search results page (eg. http://www.abstractsonline.com/pp8/#!/4376/presentations/rubinstein/1), it seems that, although as far as I can see I'm using the same correct URL for single entries, the object used by the callback function of ZU.processDocuments(url,function (doc){ … })
does not seem to contain the actual page content. So the same code that works for single entry does not work for multiple input.
Also, probably from the same reason, attachments
is not working properly (the snapshot only shows page layout without an actual content, with a sign that says loading is taking time), although the URL is correct.
// attachments
item.attachments = [{
url: doc.URL,
title: "Print page",
mimeType: "text/html",
snapshot: true
}];
Before I give up implementing multiple
and attachments
(I'm almost given them up), is there a good way to work around this kind of website? Any useful function to retrieve the actual page content with a given URL?
Cheers,
Kouichi
However, when I try to run
doWeb()
from search results page (eg. http://www.abstractsonline.com/pp8/#!/4376/presentations/rubinstein/1), it seems that, although as far as I can see I'm using the same correct URL for single entries, the object used by the callback function ofZU.processDocuments(url,function (doc){ … })
does not seem to contain the actual page content. So the same code that works for single entry does not work for multiple input.
211 | Object |
AuthorBlock | <b>*L.-L. PAI</b><sup>1</sup>,…Harvard Med. Sch., Boston, MA |
ControlNumber | 14440 |
DisclosureBlock | <b>L. Pai:</b> None.&nbs…funds); Neurona Therapeutics. |
End | 11/13/2017 10:00:00 AM |
Id | 30154 |
Position | 18 |
PosterboardNumber | B8 |
PresentationNumber | 282.18 |