Getting info from Internet

B

Bob Bedford

I've to search some addresses from professionals and put the values in an
Excel table.

I've been able to create the complex string for returning such professionals
by regions. Problems
N°1: I've to copy-paste this list and they are about 30 pages with 10
addresses per page (and about 200 regions) !
N°2: copy-paste gives me this struct (not always the same)
group
Name1
Name2 (sometimes)
address1
zip locality/region phone number
*some text (not always there)
some other text (may vary, but can get a common text)

For simplify it, here is a simple query:
http://tel.search.ch/result.html?name=&misc=charcuterie&strasse=&ort=&kanton=JU&tel=

Now I've to get this text in an excel table, but horizontally, not
vertically (1 value per column, not row).
Generally I've to do:
first row after an empty row is the group, here "Metzgerei" (so it goes on
the first column)
second column and third (third only if Bold): second and third column
4th field address1
5th field address2 (sometimes)
then a zip code (4 numbers, always) followed by a city name then a slash (/)
the region and then phone number
I've to put the zip code in the 6th column, the city in the 7th and then the
phone number in the 8th
Also sometimes there is the fax number, so I've to detect if the cell starts
with FAX and then put on the 9th row
The last line may contain 2 differents values: "Carte", "vCard". I've to
remove it if one of this text is present
then there is a blank line before it starts again.

So my questions are:
- how to get values directly from the web pages ? (I've to start after a
certain text, only getting visible text, not html code)
like
http://tel.search.ch/result.html?name=&misc=charcuterie&strasse=&ort=&kanton=JU&tel=
and then start after the word "inscriptions"
the second page is:
http://tel.search.ch/result.html?pos=10&name=&misc=charcuterie&strasse=&ort=&kanton=JU&tel=
(pos 10)
- most important, how to save those values in column instead of rows.

A very long task if it's done manually, so I've to automate it.

Thanks for help.

Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top