Facebook and regex

aleksa77

Client
Регистрация
30.09.2011
Сообщения
914
Благодарностей
90
Баллы
28
Is anybody have some advice about regex and facebook source, sometimes it works fast, but sometimes it is very slow, I tried to extract parts, but it is the same, first, I do not catch why sometimes for the same page is slow and sometimes not, but Facebook looks crazy every day more and more .
 

backoff

Client
Регистрация
20.04.2015
Сообщения
5 926
Благодарностей
6 389
Баллы
113
I advise you to use xpath works much faster and much more accurate
and regular works slowly because there is a lot of code on the page that is loaded through js and it is much more difficult for regular to process it

be smarter - use xpath )
especially for FB
 
  • Спасибо
Реакции: aleksa77

PHaRTnONu

Client
Регистрация
01.10.2016
Сообщения
340
Благодарностей
48
Баллы
28
Because FB ads a random assortment of div to html coding and random letters and numbers to trick bots up (if you ever save the html from day to day you will see the assortment of bs they do in the coding.
As Backoff said xpath is the solution to this.
 
  • Спасибо
Реакции: aleksa77

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