Regexp in Project Creator doesn't work as in RegExp Designer

hubov

Новичок
Регистрация
15.07.2014
Сообщения
11
Благодарностей
0
Баллы
1
Hi,

I have a problem with RegExp. I tried a lot methods to extract a list of elements on a page. I've used RegExp Designer (in the Project Creator) and tested in on the page source (taken from Project Creator as well). It works and find everything I needed.
I copied the Expression and tried in Project Creator -> Action Designer but there are more results than expected. Should I change other Action Designer settings or what?

Regexp designer view:


Action designer view:


Thanks in advance for help!
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
Two different things:
1) you search in Dom by regexp
2) your search for div elements with innerhtml taht contains this regex
since there are a lot of divs inside other divs you get more results
 

hubov

Новичок
Регистрация
15.07.2014
Сообщения
11
Благодарностей
0
Баллы
1
Thank you for the answer rostonix.
I tried to change the other settings in Action designer but without expected result. Is it possible to adjust the settings somehow to get the elements I need?

For example: looked in "body" <- but than I got only 1 result..
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
What is you goal? What you wanna scrape?
 

hubov

Новичок
Регистрация
15.07.2014
Сообщения
11
Благодарностей
0
Баллы
1
I need to scrape Google Maps. Sometimes for searched phrase I get a list of "places". I need to run an action "click" on every div/span to enter a page of each "google maps place" and scrape data in it.
Example phrase: "Fogorvosi Rendelő Mohács Park, Hungary" - I get a list of 10 results.
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
I would separate projects into two.
1) Scrape only links to singli listings
2) visit each listing and scrape data from there
 

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