kamran 0 Posted February 22, 2010 Report Share Posted February 22, 2010 Hi Ubotters,I was creating my first bot, but got stuck. I cant figure out how to crop and append urls. This is what I am trying to do:I have a list of URLs, all of them look like this: http://www.domain.com/index.php?AHT=8&id=3Wl87CEOPD and i want to change and navigate to:http://www.domain.com/index.php/member/login/ as you can see, the part until "index.php" remains the same and after that I want to remove the "?AHT=8&id=3Wl87CEOPD" and instead add "/member/login/" to the end. Can someone give me an idea how to go about doing this in ubot. I will appreciate it very much. Thanks Quote Link to post Share on other sites
greencat 18 Posted February 23, 2010 Report Share Posted February 23, 2010 Hi Ubotters,I was creating my first bot, but got stuck. I cant figure out how to crop and append urls. This is what I am trying to do:I have a list of URLs, all of them look like this: http://www.domain.com/index.php?AHT=8&id=3Wl87CEOPD and i want to change and navigate to:http://www.domain.com/index.php/member/login/ as you can see, the part until "index.php" remains the same and after that I want to remove the "?AHT=8&id=3Wl87CEOPD" and instead add "/member/login/" to the end. Can someone give me an idea how to go about doing this in ubot. I will appreciate it very much. Thanks You would need to use $replace - if you watch the tutorial on how to build your own Google keywords bot it explains $replace. Alternatively - you could try the Strings library on this forum. That also has a string replace function. 1 Quote Link to post Share on other sites
bluegoat 24 Posted February 23, 2010 Report Share Posted February 23, 2010 I have a list of URLs, all of them look like this: http://www.domain.com/index.php?AHT=8&id=3Wl87CEOPD and i want to change and navigate to:http://www.domain.com/index.php/member/login/Thanks to alcr I can attach more bots so try this example:Regex Eval URL.ubot 1 Quote Link to post Share on other sites
kamran 0 Posted February 23, 2010 Author Report Share Posted February 23, 2010 Thanks greencat for the idea. And bluegoat, you are amazing. This one does exactly as i wanted and more. i hope to start sharing both in this wonderful community soon. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.