[SOLVED] Grabbing urls of search results?

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
I'm in the process of trying to capture the urls of a google results page, save it to a file/list, then select a random url to go to.

But I'm stuck at trying to grab the urls of the google results page (usually 10 results). How can I do this in the regular expressions designer?
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 712
Баллы
113
Try this regex:

Код:
(?<="r"><a\ href=").*?(?=")
 

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
Try this regex:

Код:
(?<="r"><a\ href=").*?(?=")
Thanks. The regex you provide is better than the one I managed to come up with


Код:
(?<=<h3\ class="r"><a\ href=")[\w\W]*?(?=")

The second issue I'm having is saving the urls of the search results. If I use DOM (Tab data) and select What to take: First, it only gives me the first url as a variable. But when I select All, and am prompted to choose a list to save to, the 10 search result urls still won't show.

Here is the template:

Посмотреть вложение 2972
 

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
Under List I had to check boxes: Load from a file & Save change list to file. Then made sure to enter the file path.
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 712
Баллы
113
  • Спасибо
Реакции: shabbysquire

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