The Daily Click ::. Forums ::. Klik Coding Help ::. Pulling certain information from a web page?
 

Post Reply  Post Oekaki 
 

Posted By Message

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
15th July, 2011 at 18:07:43 -

I am trying to pull phone numbers from the yellow pages. I don't know anything about making spiders or how they work and our programmer isn't available so I'm either going to have to pull the numbers manually, or use MMF2 to do it, since thats the only thing I know.

The link looks like this

http://anywhoyp.yellowpages.com/findaperson?fap_terms%5Bfirst%5D= jason&fap_terms%5Blast%5D=baldwin&fap_terms%5Bcity%5D=71112&fap_terms%5Bstate%5D=LA&fap_terms%5Bsearchtype%5D=phone

Without formatting - http://anywhoyp.yellowpages.com/findaperson?fap_terms%5Bfirst%5D=jason&fap_terms%5Blast%5D=baldwin&fap_terms%5Bcity%5D=71112&fap_terms%5Bstate%5D=LA&fap_terms%5Bsearchtype%5D=phone


I have a list of names, and they all have the same zip code so I can just change the names in that link to pull up the correct page. My question is - is there any way that I can search each URL individually, using a names list, and output the phone number to a list in MMF?

Any help is greatly appreciated.

 
n/a

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  50102

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
15th July, 2011 at 18:53:10 -

Get object and string parser.

That'll do ya!

 
n/a

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
15th July, 2011 at 19:24:40 -

Thanks, that helped a lot.

Is there any way to set up string parser to pull phone numbers? I tried inputting the text from the get object into the rich text object and pulling the line number that the phone number is on, but it doesn't seem to jump to the correct line numbers.

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1960

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
15th July, 2011 at 20:35:04 -

The source contains this element:

<p class="phone">
318-752-2877
</p>

Just find the substring "<p class=""phone"">", and then copy every character after that until you get to "<".


eg.

+ Whenever
-> Get URL: whatever...

+ On get complete
-> set startChar to "Find(Received$( "Get object" ), "<p class=""phone"">", 0)"
-> start loop "extract"-1 times

+ on loop "extract"
-> set curChar to "Mid$(Received$( "Get object" ), startChar + 18 +LoopIndex("extract"), 1)"

+ on loop "extract"
+ curChar <> "<"
-> set phoneNo to phoneNo + curChar

+ on loop "extract"
+ curChar = "<"
-> stop loop "extract"

I really hope you're going to use this responsibly, and not make a lot of nuisance calls to people (I get seriously pissed off with telepests).

Edited by Sketchy

 
n/a

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
15th July, 2011 at 21:23:00 -

Are you using the original string parser, or string parser 2?

I'm stuck here

+ On get complete
-> set startChar to "Find(Received$( "Get object" ), "<p class=""phone"">", 0)"

I'm using string parser 2, which doesn't allow me to use the "find" function in an expression?

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1960

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
15th July, 2011 at 23:38:25 -

Neither. It's a built-in feature.

 
n/a

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
16th July, 2011 at 16:20:51 -

Thankyou

 
n/a

Phredreeke

Don't listen to this idiot

Registered
  03/08/2002
Points
  4504

You've Been Circy'd!VIP MemberPS3 Owner
16th July, 2011 at 16:46:28 -


Originally Posted by GamesterXIII


http://anywhoyp.yellowpages.com/findaperson? fap_terms%5Bfirst%5D=jason&fap_terms%5Blast%5D=baldwin&fap_terms%5Bcity%5D=71112&fap_terms%5Bstate%5D=LA&fap_terms%5Bsearchtype%5D=phone



That made me lol

 
- Ok, you must admit that was the most creative cussing this site have ever seen -

Make some more box arts damnit!
http://create-games.com/forum_post.asp?id=285363

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
16th July, 2011 at 21:58:57 -

I was actually waiting for this . . .aha

 
n/a
   

Post Reply



 



Advertisement

Worth A Click