Unfancify a White Pages search.

Discussion in 'HTML' started by Ulrich Glumpf, Jan 10, 2007.

  1. Hi,
    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
    'pagesblanches').

    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'
    value='wanadoo'></p></td></tr>
    <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'
    value='Jean'></p></td></tr>
    <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'
    value='PARIS'></p></td></tr>

    <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,
    Ulrich
    Ulrich Glumpf, Jan 10, 2007
    #1
    1. Advertising

  2. 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.
    Interesting.

    Ulrich.






    "Ulrich Glumpf" <> a écrit dans le message de
    news: 45a4f65b$0$25935$...
    > Hi,
    > 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
    > 'pagesblanches').
    >
    > 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'
    > value='wanadoo'></p></td></tr>
    > <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'
    > value='Jean'></p></td></tr>
    > <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' value='PARIS'></p></td></tr>
    >
    > <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,
    > Ulrich
    >
    Ulrich Glumpf, Jan 10, 2007
    #2
    1. Advertising

  3. Ulrich Glumpf

    John Hosking Guest

    Ulrich Glumpf wrote:
    > Hi,
    > I have a database full of people with addresses but I don't have phone
    > numbers for all of them.


    > 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?
    >


    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"
    method="POST">
    <table style="border:2px solid #3333FF; margin-top:1em;">
    <tr>
    <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"
    value="Jean"></p></td></tr>
    <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'>
    </td>
    </tr>
    </table>
    </form>

    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 !
    --
    John
    John Hosking, Jan 10, 2007
    #3
  4. Ulrich Glumpf

    Andy Dingley Guest

    Ulrich Glumpf wrote:

    > 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.


    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
    HTML.
    Andy Dingley, Jan 10, 2007
    #4
  5. Ulrich Glumpf

    Guest

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

    Ulrich Glumpf wrote:
    > Hi,
    > 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
    > 'pagesblanches').
    >
    > 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'
    > value='wanadoo'></p></td></tr>
    > <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'
    > value='Jean'></p></td></tr>
    > <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'
    > value='PARIS'></p></td></tr>
    >
    > <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,
    > Ulrich
    , Jan 14, 2007
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Niels Dybdahl

    Color.white vs. Color.WHITE

    Niels Dybdahl, Oct 6, 2004, in forum: Java
    Replies:
    3
    Views:
    413
    Chris Smith
    Oct 6, 2004
  2. Ben C
    Replies:
    6
    Views:
    2,124
    Leif K-Brooks
    Jan 28, 2007
  3. Replies:
    2
    Views:
    258
    Richard Bos
    Aug 22, 2007
  4. Alex Rybalov

    asp pages randomly showing as blank white pages

    Alex Rybalov, May 27, 2004, in forum: ASP General
    Replies:
    2
    Views:
    274
    Alex Rybalov
    May 27, 2004
  5. Abby Lee
    Replies:
    5
    Views:
    367
    Abby Lee
    Aug 2, 2004
Loading...

Share This Page