Jump to content

Recommended Posts

I am using CURL to rip content from google map's

 

and in the source code i get this

 

<div class=rescat>Category: <span dir=ltr>Restaurants - <b>Indian</b></span></div><div align=left><div class=s dir=ltr>"Indian and Thai food: but servers Bengali, Thai and even some Japanese food. So the starters include Chicken Tikka, Prawn Toast and Sword Fish Tempura <b>...</b>"</div></div><span class="f noprint"><a class=f href=/local_url?q=http://www.bluecobra.com/&dq=indian+delivery+in+berkshire&f=q&source=s_q&hl=en&geocode=&sll=52.173511,-0.411301&sspn=0.205075,0.441513&ie=UTF8&ll=52.089633,-0.411301&spn=0.205462,0.441513&z=11&view=text&ei=-NRkSqfsAo-wjAeD2PCTDA&mpnum=9&attrid=&oi=maps_text&sa=X&ct=website&cd=1&cad=cid:16738287191014861748&s=ANYYN7lSZHqg0Dm0IkVVTQ1Iv0QgZeE_HA dir=ltr>Website</a>&#8206; - <a class=f href=/maps?li=d&hl=en&f=d&iwstate1=dir:to&daddr=20+High+St,+Theale,+Reading,+RG7+(Blue+Cobra+Piano+Restaurant)&geocode=CT8mHnpGvy10FWnfEAMd6Zfv_w&iwloc=1&dq=indian+delivery&ei=-NRkSqfsAo-wjAeD2PCTDA dir=ltr>Directions</a>&#8206;</span></div></div></div></td></tr><tr><td class=res><div class=one><div class="icon lsicon" log=miw id=marker_B_2><img alt=B src=http://maps.gstatic.com/intl/en_uk/mapfiles/transparent.png class="mp iconB" /></div><div class="text vcard indent block" id=panel_B_2><div class="name lname"><a href=/maps?f=q&source=s_q&hl=en&geocode=&q=indian+delivery+in+berkshire&sll=52.173511,-0.411301&sspn=0.205075,0.441513&ie=UTF8&view=text&ei=-NRkSqfsAo-wjAeD2PCTDA&attrid=&latlng=16621787129134884716&cd=2 log=miw id=link_B_2><span id=title class="fn org" dir=ltr>Spice <b>Indian</b> Restaurant</span>&#8206;</a><span><a class=f href=/maps?f=q&source=s_q&hl=en&geocode=&q=indian+delivery+in+berkshire&sll=52.173511,-0.411301&sspn=0.205075,0.441513&ie=UTF8&view=text&ei=-NRkSqfsAo-wjAeD2PCTDA&attrid=&latlng=16621787129134884716&cd=2&dtab=2&pcsi=16621787129134884716,0 log=miwd id=nrev_B>1 review</a> - <a class="f nw" href=https://www.google.com/accounts/ServiceLogin?service=local&hl=en&nui=1&continue=http://maps.google.co.uk/maps%3Ff%3Dq%26source%3Ds_q%26hl%3Den%26geocode%3D%26q%3Dindian%2Bdelivery%2Bin%2Bberkshire%26sll%3D52.173511,-0.411301%26sspn%3D0.205075,0.441513%26ie%3DUTF8%26view%3Dtext%26ei%3D-NRkSqfsAo-wjAeD2PCTDA%26attrid%3D%26dtab%3D2%26cid%3D16621787129134884716%26iwd%3D1%26iwloc%3DA%26action%3Dopen log=miwd id=wrev_B>Write a review</a></span></div>

 

is there some sort of code i can use that will scan for this code and then remove it all ?,

 

many thanks,

 

James.

i need some sort of function that will search for

 

this at the beginning

 

<div class=rescat>Category:

 

and this at the end

 

Write a review</a></span></div>

 

and and replace everything starting with

 

<div class=rescat>Category:

 

and ending in

 

Write a review</a></span></div>

 

James.

Right. You need....

 

What part of it are you having trouble with?

 

 

Well, At the risk of me sounding dumb, All of it lol :(,

 

i just need a replacer that will search the above from start to end and replace all that contents.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.