Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.
I have an NSScanner set up to scan through an NSString that contains HTML. I want to sift through the HTML and get the main text, author, and date from a website. The code correctly grabs all the titles, but when it goes for the authors, it skips the very first one messing up which author goes to their correct post.
Here is my code (and I have double checked with the HTML online source to verify the tags are correct). Does anyone see something wrong with the code?
// find start of tag [theScanner scanUpToString:@\"<pre class=\\"content\\">\" intoString:NULL] ; // find end of tag [theScanner scanUpToString:@\"</pre>\" intoString:&text]; text = [text stringByReplacingOccurrencesOfString:@\"<pre class=\\"content\\">\" withString:@\"\"]; [titlesArray addObject:text];
// find start of tag [theScanner scanUpToString:@\"<div class=\\"date\\">\" intoString:NULL] ; // find end of tag [theScanner scanUpToString:@\"</div>\" intoString:&date]; date = [date stringByReplacingOccurrencesOfString:@\"<div class=\\"date\\">\" withString:@\"\"]; [datesArray addObject:date];
// find start of tag [theScanner scanUpToString:@\"<div class=\\"date\\">Posted By: \" intoString:NULL] ; // find end of tag [theScanner scanUpToString:@\"</div>\" intoString:&author]; author = [author stringByReplacingOccurrencesOfString:@\"<div class=\\"date\\">Posted By: \" withString:@\"\"]; [authorsArray addObject:author];
}
Output (What it should be): Title 1: This is post 1 Author: Joe
Title 2: This is post 2 Author: Bob
Output (What is it now/incorrect) Title 1: This is post 1 Author: Bob
Replies
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeThanks.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome