1 of 1 people found this helpful
Insert From URL is supposed to fully render the content of the target URL into memory before it writes it into your target field. Scraping the web viewer via GetLayoutObjectAttribute though does not wait for all loading to complete.
Based on a page rendering ~2,000 lines of code, I'd say the .01% difference is based on the context differences between the two functions. I'm fairly certain that their base functionality is not the same, and Insert From URL has nothing to do with the webviewer object as far as I know.
If the page you are comparing has dynamic header content that is being rendered based on the requesting client (IE from a CMS, or other framework), then it could explain the difference you are seeing.
I can confirm though I've seen this difference before, and since 12, I've almost exclusively favored Insert From URL for more accurate web scraping results.
I have been careful to check for a complete load before scraping the web viewer with GetLayoutObject. And indeed the difference I observe is fairly high up in the html stream, ~line 125.
I suspect you are correct in identifying the context differences of the two functions as the cause.
It is certainly true that there is dynamic content on the page I am looking at.
Tx for your thoughts.
Most people scrape between the body tags, you might want to run a difference comparison to see if that section's different between the two. Or is there a reason you need to scrape out of the header?
I would compare what I need out of the code result, rather than focus on the differences. Stuff like that can drive you up the wall and have no real impact on what you're trying to do. (we've ALL been there too).