Unfancify a White Pages search.

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have a database full of people with addresses but I don't have phone
numbers for all of them.
Some of these people are late with their payments. I have made a list of
thes late payers with their address all their payments etc and this list is
diplayed as HTML web page so that my secreatary can call them and reind them
to pay.

My machine produces the web page every night and my secretary can bring it
up in her browser.

As I have the name and the address she could then look them up in the white
pages but this is a drag as she has to copy and paste the data from my web
page into the White Pages web page and then submit the form.

I thought that I could copy (snip) the relevant HTML code from the white
pages web page and paste it into my web page so she could click on my web
page which would have the form already filled in. One forme per customer. In
fact I did this a few years back and it worked quite well. Now it's working
well bad as the White pages page has become quite fancy and is now full of
javascript and flash and Vbs and I can't pin down the relevant snippets that
I need to copy and paste for her to submit as a simple form.

Here is the url of the white pages, "Pages Blanches" as they say here,
http://www.pagesjaunes.fr/pb.cgi ?
(Yes, the domain is 'pagesjaunes.fr' but the cgi is 'pb' for

and here is the code I'm using
<form action='http://www.pagesjaunes.fr/pb.cgi ' target='w_content'
name='form' method='post'></p></td></tr>
<tr><td><p Class ='Details'><input type='hidden' name='portail'
<tr><td ><p Class ='Details'>Nom &nbsp; &nbsp; &nbsp; <input name='FRM_NOM'
size='20' value='Dupont'>
&nbsp; &nbsp; Prenom &nbsp;<input name='FRM_PRENOM' size='20'
<tr><td ><p Class ='Details'>Adresse &nbsp;<input name='FRM_ADRESSE'
size='20' value='25 r Broca'>
&nbsp; &nbsp; &nbsp; &nbsp; Ville &nbsp;<input name='FRM_LOCALITE' size='20'

<tr><td ><p Class ='Details'>Dept &nbsp; &nbsp; &nbsp;<input
name='FRM_DEPARTEMENT' size='20' value='75'>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<input type='Submit'
name='BF_INSCRIPTIONS_REQ' value='Rechercher'></form>
Could someone check that out and tell me how to get it working again.
Thanks in advance,

Re: Unfancify a White Pages search.

I discovered the problem.
And corrected it.
It was a hidden form value called "portail".
I rmoved it and the remote form now appears with my values already keyed
into the data field.
As required.


Quoted text here. Click to load it

Re: Unfancify a White Pages search.

Ulrich Glumpf wrote:
Quoted text here. Click to load it

First of all, I am not sure I am comfortable about what you are trying
to do here. I get a little itchy when I put form code in a page that
submits to *somebody else's* server. You have to decide if this action
is appropriate for you, based on legal and ethical considerations.

But just for the technical challenge, I took a swing at it. I have
virtually no experience with forms, so I thought I'd try it, and maybe
learn something. So the next thing for you to consider before proceeding
is that in my inexperience, I may have left some hole in the code. I may
have omitted something important, or included something unnecessary, or
even harmful. But... it seems to "work". ;-)

Here it is:

<form action="http://www.pagesjaunes.fr/pb.cgi " target="w_content"
<table style="border:2px solid #3333FF; margin-top:1em;">
<td><input type="hidden" name="faire" value="decode_input_image">
<input type="hidden" name="DEFAULT_ACTION" value="bf_inscriptions_req">
<input type="hidden" name="SESSION_ID" value="FG-D37DAD0-16F62">
<input type="hidden" name="VID" value="FG-D37DAD0-16F62">
<input type="hidden" name="INFO_VILLE" value="non">
<input type="hidden" name="CODE_LOC_INFO_VILLE" value="00000000">
<input type="hidden" name="IV_ACTIVATION" value="oui">
<input type="hidden" name="lang" value="FR">
<input type="hidden" name="pays" value="FR">
<input type="hidden" name="srv" value="PB">
<input type="hidden" name="TYPE_RECHERCHE" value="ZZZ">
<p Class ='Details'>Nom &nbsp; &nbsp; &nbsp; <input name="FRM_NOM"
size="32" value="Dupont">
&nbsp; &nbsp; Prenom &nbsp;<input name="FRM_PRENOM" size="32"
<tr><td ><p Class ='Details'>Adresse &nbsp;<input name="FRM_ADRESSE"
size="32" value="25 r Broca">
&nbsp; &nbsp; &nbsp; &nbsp; Ville &nbsp;<input name="FRM_LOCALITE"
size="32" value="PARIS"></p></td></tr>

<tr><td ><p Class ='Details'>Dept &nbsp; &nbsp; &nbsp;<input
name="FRM_DEPARTEMENT" size="32" value="75">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<input
type='Submit' name="BF_INSCRIPTIONS_REQ" value='Rechercher'>

It doesn't validate because of the target, but it should help you. I
don't know anything about your Details class so I didn't muck with
caption formatting or try to discard unnecessary <p> tags. You might
research the <label> element for yourself, too.

Bon chance !

Re: Unfancify a White Pages search.

Ulrich Glumpf wrote:

Quoted text here. Click to load it

Doing this automatically is known as "screen scraping". You'll probably
find lots of useful advice if you search under that term.

There are two difficulties in doing it. It's technically difficult and
it's legally problematic too for copyright issues.

Technically it's awkward because most web sites are designed to be
viewed by humans rather than read by machines. A good
semantically-designed site is easy to scrape, a graphically intensive,
Flash or simply badly-coded site may be impractical to use. There's
also the problem that sites may change their design unpredictably. This
is often sufficient to make your problem start again  from scratch. The
best solution I've found to all this (IMHO) is probably to look at
using Python and a library called Beautiful Soup.

Legally there is clear copyright protection (should the site wish) on
anything that resembles a database query. If they aren't actively
encouraging you to do this, they're probably discouraging you and will
have a good legal basis for making you stop. It's also technically
simple to make life hard for you as an automatic query robot and many
"attractive" sites do just this.

If you possibly can do, find a "web service" that offers the same query
service and use that instead. It's far easier than working with raw

Re: Unfancify a White Pages search.

You can try SWExplorerAutomation (SWEA) from http://webiussoft.com .
You can easily develop the search  solution with SWEA.

Ulrich Glumpf wrote:
Quoted text here. Click to load it

Site Timeline