DOM HTML vs Source HTML

  • Автор темы Автор темы Perfecto
  • Дата начала Дата начала

Perfecto

Client
Регистрация
06.08.2013
Сообщения
108
Реакции
9
Баллы
18
Hi!

What is the clear difference between DOM and html source?
What is the best choice for scrape HTML ?
 
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.
 
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?
 

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