Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Strip PHP page

by bauer1sc (Initiate)
on Aug 06, 2007 at 17:29 UTC ( [id://630861]=perlquestion: print w/replies, xml ) Need Help??

bauer1sc has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Strip PHP page
by cengineer (Pilgrim) on Aug 06, 2007 at 18:00 UTC
    What are the entries that you ARE actually after??
      The entries appear on the site as a table :
      Company City State or Province Country + Certificate Number More ZF Boge Elastmetall Hebron Kentucky + United States CERT-03170-2004-AE-HOU-RAB More YKK AP America, Inc. Dublin Georgia + United States CERT-05094-2003-AE-HOU-RAB More Yamaha Motor Mfg. Corp. of America Newnan + Georgia United States CERT-03164-2003-AE-HOU-RAB + More Xycom Automation Saline Michigan + United States CERT-07076-2004-AE-HOU-RAB More Wiltech of Florida Corp., Inc. Kennedy Space +Center Florida United States CERT-05042-2003- +AE-HOU-RAB More Weir Floway, Inc. Fresno California + United States CERT-07585-2004-AE-HOU-ANABR1 More Weastec, Inc. Greenfield Ohio + United States CERT-05010-2004-AE-HOU-ANAB, R1 More Weastec, Inc. Hillsboro Ohio +United States CERT-03152-2004-AE-HOU-ANAB, R1 More Weastec, Inc. Seaman Ohio Uni +ted States CERT-05011-2004-AE-HOU-ANABR1 More Wartsila North America Ft.Lauderdale +Florida United States CERT-10118-2005-AE-HOU-ANAB + More Wartsila North America Harvey Louisia +na United States CERT-06437-2004-AE-HOU-ANABR2 More Wabash Technologies - Huntington Huntington + Indiana United States CERT-04595-2003-AE-HOU-R +ABR1 More VITRUS Pawtucket Rhode Island + United States CERT-07357-2004-AE-HOU-RAB More UT MD Anderson Bastrop Texas +United States CERT-05001-2004-AE-HOU-RAB More Vishay Siliconix Santa Clara Californ +ia United States CERT-03259-2004-AE-HOU-RAB More Veolia Water North America - Cerntral Pontiac + Michigan United States CERT-05785-2003-AE-HO +U-ANAB More UT MD Anderson Houston Texas +United States CERT-03592-2004-AE-HOU-RAB More Tyco Electronics M/A-Com, Inc. Lowell + Massachusetts United States CERT-04000-2005-AQ-HOU-A +NAB More Trigen/Cinergy Solutions Lansing Mich +igan United States CERT-04052-2005-AE-HOU-ANAB More Trefilarbed Arkansas, Inc. Pine Bluff + Arkansas United States CERT-10661-2005-AE-HOU-ANAB + More Transition Networks, Inc. Eden Prairie + Minnesota United States CERT-02683-2003-AE-HOU-RAB + More Toyota North American Parts Center - KY Hebro +n Kentucky United States CERT-06550-2004-AE-H +OU-RAB More Trace Die Cast, Inc. Bowling Green Ke +ntucky United States CERT-06234-2003-AE-HOU-RAB More Toyota Motor Sales, U.S.A., Inc. Ontario + California United States CERT-04245-2005-AE-HOU-A +NAB More Toyota Motor Sales, USA West Caldwell + New Jersey United States CERT-06180-2003-AE-HOU-ANAB + More Toyota Motor Sales, U.S.A., Inc. Torrance + California United States CERT-04246-2005-AE-HOU- +ANAB More Toyota Motor Sales USA, Inc. San Ramon + California United States CERT-03294-2004-AE-HOU-RAB + More Toyota Motor Sales U.S.A., Inc. Cincinnati + Ohio United States CERT-03419-2004-AE-HOU-ANAB, + R1 More Toyota Motor Sales U.S.A., Inc. Mansfield + Massachusetts United States CERT-02611-2003-AE-H +OU-RAB More Toyota Motor Sales U.S.A., Inc. Aurora + Illinois United States CERT-06876-2004-AE-HOU-RAB
        Is this table you speak of in a frame (or an iframe) or written out by JavaScript (document.write or such). Since you didn't simply give us the URL or the complete HTML (in read more tags) it is difficult to help. I am guessing you are using WWW::Mechanize to get this page, since you did not tell us exactly what you are doing here you have not made it easy for people to help you. See the PerlMonks FAQ and How do I post a question effectively?.

        Martin
Re: Strip PHP page
by Popcorn Dave (Abbot) on Aug 07, 2007 at 04:01 UTC
    You might also look at HTML::TokeParser to get at the information you're after. I used it to strip headlines from newspaper sites a while back and it worked well for me.


    Revolution. Today, 3 O'Clock. Meet behind the monkey bars.

    I would love to change the world, but they won't give me the source code

Re: Strip PHP page
by greywolf (Priest) on Aug 06, 2007 at 21:18 UTC
    My first thought is that your problem is because you're trying to get the results of a submitted form not the page in question. If you pass that address to your script you'll likely get the source page before the form is submitted. Check the html source that your script is receiving to make sure the results you're after are actually in there. It looks like your code stripping is working fairly well.

    mr greywolf

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://630861]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-04-19 06:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found