Jump to content
UBot Underground

Recommended Posts

Hi all,

 

Been trying to figure this out on my own but I am stuck.

 

What I am trying to do is remove everything before id in my list of urls.

 

The list looks like this:

http://ezinearticles.com/?UBot-Studio---The-Ultimate-in-Web-Automation?&id=3443164
http://ezinearticles.com/?Build-Your-Own-Software-for-SEO,-Is-It-Possible?&id=6411746

 

What I am needing to do is remove everything before ?&id= and leave the list looking like this:

?&id=3443164
?&id=6411746

 

Or even:

3443164
6411746

 

Any help would be greatly appreciated.

 

Thanks,

Justin

Link to post
Share on other sites

I have dug around a little bit and this: ^.*?= is supposed to get rid of everything before the =. I just don't know how to implement it in my list to clean all the urls.

Link to post
Share on other sites

Hi,

 

Sample code:

set(#urld, "http://ezinearticles.com/?UBot-Studio---The-Ultimate-in-Web-Automation?&id=3443164
http://ezinearticles.com/?Build-Your-Own-Software-for-SEO,-Is-It-Possible?&id=6411746", "Global")
clear list(%urls)
add list to list(%urls, $list from text(#urld, $new line), "Delete", "Global")
loop($list total(%urls)) {
   if($comparison($list position(%urls), "<", $list total(%urls))) {
       then {
           set(#urlitem, $next list item(%urls), "Global")
           set(#urlitemid, $replace regular expression(#urlitem, ".*&id=", $nothing), "Global")
       }
       else {
       }
   }
}

sample-return-id-001.ubot

 

Kevin

  • Like 2
Link to post
Share on other sites

Thanks Kevin,

 

Is there any chance I can remove everything before the "=" while scraping from google?

 

This is the code I am using to scrape from google:

add list to list(%urls, $scrape attribute(<class="l">, "href"), "Delete", "Global")

 

It would really be awesome if you could help me figure that out.

 

Thanks,

Justin

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