UBot Marketer 7 Posted February 4, 2014 Report Share Posted February 4, 2014 Hello every one , Is there a way to make a Comparison between the page date and the system date ( the current day ) ? Like if the page date is the current day stop the bot else start over . Thanks Quote Link to post Share on other sites
Steve 30 Posted February 4, 2014 Report Share Posted February 4, 2014 You should be able to get the system date with the shell batch plugin. Quote Link to post Share on other sites
Bot-Factory 602 Posted February 4, 2014 Report Share Posted February 4, 2014 Hi. first you have to scrapte the date from the page into a variable. Maybe you also have to convert it. So that you can compare it correctly. You can get the system date with the following plugin:http://www.ubotstudio.com/forum/index.php?/topic/13665-free-plugin-datetime-manipulation/ Hope that helps a little bit. CheersDan Quote Link to post Share on other sites
blumi40 222 Posted February 4, 2014 Report Share Posted February 4, 2014 u dont need a plugin ubot has default a $date function inside use it with a regexmethode and u got what u wantset(#myyear, $find regular expression($date, "[0-9]\{4,4\}"), "Global") Quote Link to post Share on other sites
UBotDev 276 Posted February 4, 2014 Report Share Posted February 4, 2014 If date/time format on the page is in the same format as UBots $date then you can just go ahead and compare them directly, if not, I think you'll find the DateTime Manipulation plugin helpful, since for comparison you'll want to convert both times to UNIX time-stamp before comparing them. Here is an example of comparison:http://ubotdev.com/free-plugin-datetime-manipualtion#compare-two-unix-timestamps-to-get-time-difference Quote Link to post Share on other sites
UBot Marketer 7 Posted February 5, 2014 Author Report Share Posted February 5, 2014 Thank you guys you are very helpful 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.