Jump to content
UBot Underground

Cleaning Scraped Text


Recommended Posts

Hi guys,

 

I'm having trouble figuring out how to do this and would really appreciate any help that anyone could offer.

 

I am scraping a list of urls, and I want to remove (or replace with nothing) all google related urls and leave all non-google related urls.

 

Any ideas?

 

Here's a snippet of the list i'm working with...

http://www.google.com/ http://www.google.com/search?hl=en&q=xOn3HOP739w&bav=on.2,or.r_qf.&bvm=pv.xjs.s.en_US.M4-36_38X9A.O&um=1&ie=UTF-8&tbm=isch&source=og&sa=N&tab=wi http://maps.google.com/maps?hl=en&q=xOn3HOP739w&bav=on.2,or.r_qf.&bvm=pv.xjs.s.en_US.M4-36_38X9A.O&um=1&ie=UTF-8&sa=N&tab=wl https://play.google.com/?hl=en&q=xOn3HOP739w&bav=on.2,or.r_qf.&bvm=pv.xjs.s.en_US.M4-36_38X9A.O&um=1&ie=UTF-8&sa=N&tab=w8 http://www.youtube.com/results?hl=en&q=xOn3HOP739w&bav=on.2,or.r_qf.&bvm=pv.xjs.s.en_US.M4-36_38X9A.O&um=1&ie=UTF-8&sa=N&tab=w1 http://translate.google.com/?hl=en&q=xOn3HOP739w&bav=on.2,or.r_qf.&bvm=pv.xjs.s.en_US.M4-36_38X9A.O&um=1&ie=UTF-8&sa=N&tab=wT http://www.google.com/search?hl=en&q=xOn3HOP739w&bav=on.2,or.r_qf.&bvm=pv.xjs.s.en_US.M4-36_38X9A.O&um=1&ie=UTF-8&tbo=u&tbm=bks&source=og&sa=N&tab=wp http://www.google.com/search?hl=en&q=xOn3HOP739w&bav=on.2,or.r_qf.&bvm=pv.xjs.s.en_US.M4-36_38X9A.O&um=1&ie=UTF-8&tbo=u&tbm=shop&source=og&sa=N&tab=wf http://www.google.com/finance?hl=en&q=xOn3HOP739w&bav=on.2,or.r_qf.&bvm=pv.xjs.s.en_US.M4-36_38X9A.O&um=1&ie=UTF-8&sa=N&tab=we 

Link to post
Share on other sites

pftg4 - I hear ya man, but i still struggle with very low-scale regex... The regex it would take to do something like this is well above my skill level.

 

I appreciate your input man.

Link to post
Share on other sites

add list to list(%scrapegooglelinks, $scrape attribute(<outerhtml=w"*{#MyKeyword}*">, "fullhref"), "Delete", "Global")

 

Basically, because I couldn't find a better way, I just set up to scrape all urls in the google serps for a keyword, and then was/am trying to take out all of the google stuff so that I'm left with the 'regular' links left behind.
 

Link to post
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...