DOM HTML vs Source HTML

Perfecto

Client
Регистрация
06.08.2013
Сообщения
94
Благодарностей
5
Баллы
8
Hi!

What is the clear difference between DOM and html source?
What is the best choice for scrape HTML ?
 

LightWood

Moderator
Регистрация
04.11.2010
Сообщения
2 382
Благодарностей
916
Баллы
113
Hi!

What is the clear difference between DOM and html source?
What is the best choice for scrape HTML ?
  • Source text - the original text loaded from the server, you can see it in any browser, clicking the button “Show page source”. The distinguishing feature of this text is that it doesn't execute JavaScript, and frames are not loaded.

  • DOM text - the text that is gotten after executing all JavaScripts, it corresponds to a full HTML tree, it executes all JavaScripts and all DOM texts of frames are included.
:-)
Probably DOM is better. But most of times doesn't matter.
 

morpheus93

Client
Регистрация
25.01.2012
Сообщения
1 058
Благодарностей
244
Баллы
63
On some websites I have the problem (only while using the Chrome engine in ZP!) that "Check for text presence" doesn't find the required text when using "Source text". When I switch to "DOM text" it works as it should. With the FF engine I always just used Source text and it worked fine. Maybe it's because I originally created the projects with the FF engine and the the behaviour of the Chrome engine is different in this context?
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)