This question has already been answered:
I decided to write a dumper Storis (portal with stories)
On the story page like this:
<h1 id="story_title">{ИМЯРАССКАЗА} <span class="vote">
The code is:
storyid++; listBox1.Items.Add("Checking story: " + storyid + ".."); currStoryHTML = getHTML("http://site/story/" + storyid); if (currStoryHTML == "404NOTFOUND") return; Match match = Regex.Match(currStoryHTML, @"(?<=<<h1 id=" + "\"" + "story_title" + "\"" + ">>)(.*)(?=<span class=" + "\"" + "vote" + "\"" + ">)"); if (match.Success) { listBox1.Items.Add("Story with ID: " + storyid + " have name: " + match); } else { listBox1.Items.Add("Story with ID: " + storyid + " do not have name OR invalid.."); return; }
It doesn't matter if the story exists. Always math.Success = false Can you help?
<<h1
, and not<h1
? - Mints97 2:19 pm