Android 3 Posted April 2, 2016 Report Share Posted April 2, 2016 Hey, Proud new owner of Ubot Studio Standard. Bought it in the hopes of automating some very repetitive word press posting I do, but am having trouble. So my process is: Login to email, click shortened link in email, take screenshot, record full url. Then go to my WP site, new post, fill in title with title of email, add screenshot to post, add link to page below screenshot. I've been studying the tuts, but keep running into walls. I'm trying to login to an outlook email account via pop3 with the "connect to email server" command unsuccessfully. Just wont connect, I've adjusted the settings in outlook to allow pop3, and I'm sure the server, user, password are right but it keeps throwing an error when tested. So then I tried using webmail from hostgator, but still cant seem to connect via Ubot. Searching the forums tells me I may have more obstacles ahead... Can I do this with the standard edition? Quote Link to post Share on other sites
HelloInsomnia 1103 Posted April 2, 2016 Report Share Posted April 2, 2016 Going with your Hostgator email would be a much better idea if you can do it since it won't have any chance of getting banned. But you will have to lookup the settings for POP3 in Hostgator and get the correctly in order for it to work. I think what you want to do is possible for sure in Ubot. Quote Link to post Share on other sites
Android 3 Posted April 7, 2016 Author Report Share Posted April 7, 2016 Thanks Helloinsomnia... I've been working on this, and have gotten to the point where I have: Logged into pop3 accountscraped all emails into tablethenmade a list of the email subjects from the scraped table That's where I'm stuck. I'm trying to scrape a particular link in the body of the email to a list and am not sure how to do it properly.I've figured out a regex that I think isolates the link, but I'm having trouble with the steps necessary for scraping the ubot populated table using regex, and creating a list of the urls. Quote Link to post Share on other sites
HelloInsomnia 1103 Posted April 7, 2016 Report Share Posted April 7, 2016 Here is a script that shows an example of a table full of emails and how to loop through it looking for a link. The first half is creating a table of fake emails and under the dividers is the script to loop through them looking for a link. clear table(&emails) set(#row,0,"Global") loop(10) { set table cell(&emails,#row,0,"Subject: {$random text($rand(20,40))}") if($comparison(#row,"=",3)) { then { set table cell(&emails,#row,1,"REGEX EMAIL: this email contains a link in this case it\'s just http://ubotstudio.com") } else { set table cell(&emails,#row,1,"Email: {$random text($rand(20,40))}") } } increment(#row) } divider divider divider divider clear list(%links) set(#row,0,"Global") loop($table total rows(&emails)) { set(#link,$nothing,"Global") set(#link,$find regular expression($table cell(&emails,#row,1),"http\\:\\/\\/ubotstudio\\.com"),"Global") if($comparison(#link,"=",$nothing)) { then { } else { add item to list(%links,#link,"Don\'t Delete","Global") } } increment(#row) } 1 Quote Link to post Share on other sites
Android 3 Posted April 8, 2016 Author Report Share Posted April 8, 2016 Thanks for this!It helps a great deal... I was trying to get this to work last night, but I keep getting an error on my Regex.The Regex i came up with works in every editor Ive tried but Ubot seems to be adding \'s to my expression when I run the node and is throwing an error. But, I just picked up a pretty comprehensive Ubot Scraping Course that includes Ubot specific Regex info, so I should be able to figure out what I'm doing wrong tonight. Thanks again HelloInsomnia 1 Quote Link to post Share on other sites
HelloInsomnia 1103 Posted April 8, 2016 Report Share Posted April 8, 2016 Thanks for this!It helps a great deal... I was trying to get this to work last night, but I keep getting an error on my Regex.The Regex i came up with works in every editor Ive tried but Ubot seems to be adding \'s to my expression when I run the node and is throwing an error. But, I just picked up a pretty comprehensive Ubot Scraping Course that includes Ubot specific Regex info, so I should be able to figure out what I'm doing wrong tonight. Thanks again HelloInsomnia I hope you like the course if you keep getting errors in your regex PM me with the regex and I'll help you out with it. 1 Quote Link to post Share on other sites
Android 3 Posted April 10, 2016 Author Report Share Posted April 10, 2016 Still not working... I'm pretty sure my regex is ok: \nhttp\:\/\/\w+\.\w+\/\w(The link I'm looking for is almost never the same, but is ALWAYS on a new line so the \n seems to isolate it.) It picks out the required link in every regex tester I can find, but the node: set(#link,$find regular expression($table cell(&emails,#row,4),\nhttp\:\/\/\w+\.\w+\/\w),"Global") doesn't seem to grab the url, or anything at all. I've been digging all over the place with no luck.Sorry, would post the whole code but I'm using the standard version for now. Quote Link to post Share on other sites
deliter 203 Posted April 10, 2016 Report Share Posted April 10, 2016 forgive me if this answer is too simplistic,my regex sucks by the way,I googled for this expression seems to workbut if you have a table and want to get any url from the table this should work ((([A-Za-z]\{3,9\}?:\\/\\/)?)(?:[-;:&=\\+\\$,\\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\\+\\$,\\w]+@)[A-Za-z0-9.-]+)((?:\\/[\\+~%\\/.\\w-_]*)?\\??(?:[-\\+=&;%@.\\w_]*)#?(?:[\\w]*))?)") 1 Quote Link to post Share on other sites
Android 3 Posted April 10, 2016 Author Report Share Posted April 10, 2016 I'm a SuperNoob, need all the help I can get! I don't think I ever even heard of regex until two weeks ago... But I think its gotta be the way I'm setting the #link variable. I've been trying, and I cant get it work on my project, or when duplicating the sample script above.So either I'm doing something wrong, (most likely answer) or somethings not quite right. Thank you Quote Link to post Share on other sites
HelloInsomnia 1103 Posted April 10, 2016 Report Share Posted April 10, 2016 Try this: set(#email,"I\'m a SuperNoob, need all the help I can get! I don\'t think I ever even heard of regex until two weeks ago... But I think its gotta be the way I\'m setting the #link variable. I\'ve been trying, and I cant get it work on my project, or when duplicating the sample script above. So either I\'m doing something wrong, (most likely answer) or somethings not quite right. http://network.ubotstudio.com/forum/index.php/topic/19287-is-it-possible/ Thank you ","Global") set(#link,$find regular expression(#email,"(HTTP|http)(|S|s)\\:\\/\\/(|WWW\\.\\www\\.)[a-zA-Z\\.\\d-\\/-_?\\=\\+\\#\\%]+"),"Global") Trying to make a regex for a URL can actually be pretty challenging if you are new to regex. Quote Link to post Share on other sites
Android 3 Posted April 11, 2016 Author Report Share Posted April 11, 2016 HelloInsomnia, Shazam! its working! Kinda... I hate to sound like a sales letter, but I upgraded to professional and being able to look at code view and compare it to your help made all the difference in the world!I'm still missing some urls, but I think I know why. Your help is appreciated, Thank you sir! 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.