earthlingj 13 Posted December 23, 2009 Report Share Posted December 23, 2009 Hi, Lets say i have a text that is of HTML. what I want to do is seperate each line/setence/paragraph and set them as a variable. lets say i have an article thats 10 paragraphs ( in html ) I want it to seperate each paragraph (based on a tag ex. *NEWPARAGRAPH* seperates each pargraph so split on each *NEWPARAGRAPH* tag) and post each seperate paragraph to a site ( or save it ) i havnt started/tried making this yet, but i know i have no clue thats why im asking first, but thats the basic theory. any input would help thanks Quote Link to post Share on other sites
Zen 1 Posted December 23, 2009 Report Share Posted December 23, 2009 I really could use something like this too. Example: I pull a phone number from a list (321-654-7894) and I need to post it into a 3 text box phone number screen. Taking the information as it is in the list which cant be easily edited wouldn't be able to be put into those fields. Quote Link to post Share on other sites
Guest Jim Posted December 23, 2009 Report Share Posted December 23, 2009 You can split it into a list using $list from text. For the phone number example, you can just split it by - as the delimiter. For a paragraph, you may have to delimit by "</p><p>" or something similar (depends on what your html looks like) Quote Link to post Share on other sites
earthlingj 13 Posted December 23, 2009 Author Report Share Posted December 23, 2009 You can split it into a list using $list from text. For the phone number example, you can just split it by - as the delimiter. For a paragraph, you may have to delimit by "</p><p>" or something similar (depends on what your html looks like) Okay not sure i 100% understand but ill try it out now and let you know. thanks Quote Link to post Share on other sites
earthlingj 13 Posted December 23, 2009 Author Report Share Posted December 23, 2009 Alright. So i have my HTML in a block text with the varialbe #Content then I set #parseparagraphs as the variable and then list from text #Content deliminator <> i then have ui stat monitor for #parseparagraphs and its only showing the first paragraph instead of all of em. I dont see how im supposed to seperate each paragraph and make it post each paragraph seperately. Quote Link to post Share on other sites
Guest Jim Posted December 23, 2009 Report Share Posted December 23, 2009 Alright. So i have my HTML in a block text with the varialbe #Content then I set #parseparagraphs as the variable and then list from text #Content deliminator <> i then have ui stat monitor for #parseparagraphs and its only showing the first paragraph instead of all of em. I dont see how im supposed to seperate each paragraph and make it post each paragraph seperately.My laptop with UBot on it is off for repairs (fried gfx card ), so I'll try to explain how I would do this in text: + clear list +-- %paragraphs + add to list +-- %paragraphs +-+ $list from text +-- "Blah<!--delimiter-->Blah2<!--delimiter-->Blah3<!--delimiter-->Blah4" +-- "<!--delimiter-->" +-- "Yes" + loop +-+ $list total | +-- %paragraphs | +-+ set | +-- #this_paragraph | +-+ $next list item | +-- %paragraphs | +-+ (your posting code here, using #this_paragraph) | +(end of loop) (don't include quotes) Quote Link to post Share on other sites
earthlingj 13 Posted December 23, 2009 Author Report Share Posted December 23, 2009 My laptop with UBot on it is off for repairs (fried gfx card ), so I'll try to explain how I would do this in text: + clear list +-- %paragraphs + add to list +-- %paragraphs +-+ $list from text +-- "Blah<!--delimiter-->Blah2<!--delimiter-->Blah3<!--delimiter-->Blah4" +-- "<!--delimiter-->" +-- "Yes" + loop +-+ $list total | +-- %paragraphs | +-+ set | +-- #this_paragraph | +-+ $next list item | +-- %paragraphs | +-+ (your posting code here, using #this_paragraph) | +(end of loop) (don't include quotes) that looks perfect! thanks man i'll try and report back! appreciate it Quote Link to post Share on other sites
earthlingj 13 Posted December 23, 2009 Author Report Share Posted December 23, 2009 damn wont work :/ its just posting one line ( which is cuz the list ) I each line has a limit in characters so i can important paragraphs into a list. Quote Link to post Share on other sites
earthlingj 13 Posted December 23, 2009 Author Report Share Posted December 23, 2009 This might better explain... Lets say i have ONE giant article with 100s of paragraphs in it. I paste the article into a UI block text now lets say i have each paragraph split buy " <SPLIT> I want it to get the first paragraph. post it. go to the next split. post it. the next split. post it. and on and on. Quote Link to post Share on other sites
earthlingj 13 Posted December 24, 2009 Author Report Share Posted December 24, 2009 Anyone have any idea? Would really be grateful been stuck on this for a while Quote Link to post Share on other sites
earthlingj 13 Posted December 27, 2009 Author Report Share Posted December 27, 2009 sorry for bumpin.... but still looking for the solution. thankx Quote Link to post Share on other sites
tooltrainer 12 Posted December 27, 2009 Report Share Posted December 27, 2009 I don't have the exact code for you, but I would build this in a very modular fashion... tackle one small part at a time. First, figure out the parsing by <split> portion. I would expect this will require use of the regex functions in UBot... regex is a nightmare for me but it's one of the absolute most powerful things you can master. Once you have a simple bot/sub that does nothing but parse the input into chunks, then build the posting part and feed those chunks to it in a loop. I don't know if that helps but it's the approach I would take... Jonathan Quote Link to post Share on other sites
earthlingj 13 Posted December 28, 2009 Author Report Share Posted December 28, 2009 I don't have the exact code for you, but I would build this in a very modular fashion... tackle one small part at a time. First, figure out the parsing by <split> portion. I would expect this will require use of the regex functions in UBot... regex is a nightmare for me but it's one of the absolute most powerful things you can master. Once you have a simple bot/sub that does nothing but parse the input into chunks, then build the posting part and feed those chunks to it in a loop. I don't know if that helps but it's the approach I would take... Jonathan well thanks for a reply, but doesnt really help me out. I do know how to program so i understand how it SHOULD be done. My point is I dont know and cant figure out how to do this with UBOT. been asking for days now and seems like noone knows... Quote Link to post Share on other sites
tooltrainer 12 Posted December 28, 2009 Report Share Posted December 28, 2009 Gotcha... well having not tackled this one myself yet I'm afraid I don't know a definite answer. At least not all within UBot. On possibility... in another thread we've been discussing the use of PHP for certain backend operations. The kind of thing you're talking about is really easy to do in PHP. You could have UBot pass the article to a PHP page you control, which would then parse it, split it up, and return the results in a way that UBot could grab again. Maybe that would be one solution? Jonathan Quote Link to post Share on other sites
earthlingj 13 Posted December 28, 2009 Author Report Share Posted December 28, 2009 Gotcha... well having not tackled this one myself yet I'm afraid I don't know a definite answer. At least not all within UBot. On possibility... in another thread we've been discussing the use of PHP for certain backend operations. The kind of thing you're talking about is really easy to do in PHP. You could have UBot pass the article to a PHP page you control, which would then parse it, split it up, and return the results in a way that UBot could grab again. Maybe that would be one solution? Jonathan It would be a solution if i knew php I code in vb.net Quote Link to post Share on other sites
crazyflx 22 Posted December 28, 2009 Report Share Posted December 28, 2009 @ Earthling >> Would you mind explaining EXACTLY what it is you're trying to do? I don't mean like an example like the one listed above Lets say i have ONE giant article with 100s of paragraphs in it. I paste the article into a UI block text now lets say i have each paragraph split buy " <SPLIT> I want it to get the first paragraph. post it. go to the next split. post it. the next split. post it. and on and on. I mean, literally explain what you're trying to do. For example: "I'm trying to go to examplesite1.com and pull a paragraph. Then go to examplesite2.com and pull another paragraph and do that for 10 sites. Then, go to my site and post each pulled paragraph as an individual blog post." <-- something like that...I mean LITERALLY what are you trying to do? I might be able to help. Quote Link to post Share on other sites
earthlingj 13 Posted December 28, 2009 Author Report Share Posted December 28, 2009 @ Earthling >> Would you mind explaining EXACTLY what it is you're trying to do? I don't mean like an example like the one listed above I mean, literally explain what you're trying to do. For example: "I'm trying to go to examplesite1.com and pull a paragraph. Then go to examplesite2.com and pull another paragraph and do that for 10 sites. Then, go to my site and post each pulled paragraph as an individual blog post." <-- something like that...I mean LITERALLY what are you trying to do? I might be able to help. im not trying to scrape and post, that would be extremly easy and i know how to do that. Like i said.. i have 1 giant article that is split into paragraphs by <hr> I want to be able to copy and paste that FULL article into a textbox ( or load it ) and then have it go to my BLOG and post each paragraph as a seperate post.. Quote Link to post Share on other sites
crazyflx 22 Posted December 28, 2009 Report Share Posted December 28, 2009 Alright, I think I've got it figured out for you there Earthling...give me a minute to make a quick video to see if it's what you're looking for. Quote Link to post Share on other sites
earthlingj 13 Posted December 28, 2009 Author Report Share Posted December 28, 2009 Alright, I think I've got it figured out for you there Earthling...give me a minute to make a quick video to see if it's what you're looking for. thanks i really appreciate it Quote Link to post Share on other sites
crazyflx 22 Posted December 28, 2009 Report Share Posted December 28, 2009 Sorry about how long that took, my first upload to YouTube failed for some reason... It is uploaded now, I'm just waiting for it to finish being fully "converted" Quote Link to post Share on other sites
crazyflx 22 Posted December 28, 2009 Report Share Posted December 28, 2009 Alright, I've attached the compiled .exe code to this post. I'll embed the video here and you can watch it as soon as it is finished being "processed" by youtube. Whatever doesn't make sense to you in the bot will be explained in the video. You can view the video now, but the quality won't be good enough for you to read the text for about another 8 minutes. .EXE File: http://rapidshare.com/files/326843597/blog_poster.exe.html http://www.youtube.com/watch?v=5_PchZBGyTE Quote Link to post Share on other sites
crazyflx 22 Posted December 28, 2009 Report Share Posted December 28, 2009 The one thing you'll notice it's doing, is just using < as the delimiter, and is then including the hr. (the . is the lowercase version of >). So, you might have to use a one character delimiter (like only the < for example) and then it would work perfectly (I think, I'm not entirely sure this is what you were looking for). Quote Link to post Share on other sites
earthlingj 13 Posted December 28, 2009 Author Report Share Posted December 28, 2009 hey man, that looks like itll work. only thing is that hr problem but yeah i can just change the delimiters in my texts to ":" or something. Quote Link to post Share on other sites
tooltrainer 12 Posted December 28, 2009 Report Share Posted December 28, 2009 It would be a solution if i knew php I code in vb.net Ah yes, minor detail. =) Still the VB version shouldn't be tremendously different in concept. But let's see what crazyfix has come up for you first... I'm intrigued. Jonathan Quote Link to post Share on other sites
crazyflx 22 Posted December 28, 2009 Report Share Posted December 28, 2009 Well, here you go guys (I've attached the source code) Don't mind the messy code, I was kind of throwing things together in an effort to get this done quickly. If you've got any questions, let me know.earthlings bot.ubot 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.