<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=405103&amp;view=findpost&amp;p=3617526</guid>
        <pubDate>Mon, 10 Aug 2015 08:09:27 +0000</pubDate>
        <title>Простой парсер, не могу получить href из html (DOM)</title>
        <link>https://forum.sources.ru/index.php?showtopic=405103&amp;view=findpost&amp;p=3617526</link>
        <description><![CDATA[Fr0sT: Ну это не парсер, html уже распарсен WebBrowser-ом. А задача решается просто: получением узла A внутри H3 и чтением его атрибута href. innerHTML вообще применять не нужно, всё уже разложено по блюдечкам с голубой каемочкой <br>
<br>
<span class="tag-color tag-color-named" data-value="mergepost" style="color: mergepost"><span class='tag-size' data-value='7' style='font-size:7pt;'>Добавлено <time class="tag-mergetime" datetime="2015-08-10T11:14:12+03:00">10.08.15, 08:14</time></span></span><br>
<strong class='tag-b'>Filka</strong>, типичный пример ответа на сорсах.<br>
ТС: - Помогите найти ошибку в применении класса X<br>
Отв: - Выкинь класс X, бери класс Y, правда, он устроен совершенно по-другому, не обновлялся аж с 2007 года, содержит 0 документации, но ты же программист и не боишься трудностей, правда?]]></description>
        <author>Fr0sT</author>
        <category>Delphi: Сетевое программирование</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=405103&amp;view=findpost&amp;p=3617334</guid>
        <pubDate>Sat, 08 Aug 2015 15:58:13 +0000</pubDate>
        <title>Простой парсер, не могу получить href из html (DOM)</title>
        <link>https://forum.sources.ru/index.php?showtopic=405103&amp;view=findpost&amp;p=3617334</link>
        <description><![CDATA[Filka: <a class='tag-url' href='https://code.google.com/p/powtils/downloads/detail?name=fast-html-parser-jul-02-2007.zip&can=2&q=' target='_blank'>https://code.google.com/p/powtils/downloads...07.zip&can=2&q=</a>]]></description>
        <author>Filka</author>
        <category>Delphi: Сетевое программирование</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=405103&amp;view=findpost&amp;p=3617327</guid>
        <pubDate>Sat, 08 Aug 2015 14:18:44 +0000</pubDate>
        <title>Простой парсер, не могу получить href из html (DOM)</title>
        <link>https://forum.sources.ru/index.php?showtopic=405103&amp;view=findpost&amp;p=3617327</link>
        <description><![CDATA[strongmaster: Всем привет. Помогите написать простенький парсер, не могу получить href в финале.<br>
Выдергивает все что Li, потом внутри в h3, а потом в A.<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;vTags := WebBrowser1.OleObject.Document.getElementsByTagName(&#39;Li&#39;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;n1:=vTags.Length;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;if n1&#62;0 then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;begin</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for i1:=0 to n1-1 do</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;vTags1 := vTags.item(i1).getElementsByTagName(&#39;H3&#39;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;n2:=vTags1.Length;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if n2&#62;0 then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;begin</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for i2:=0 to n2-1 do</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sMemo2.Lines.Add(vTags1.item(i2).InnerHTML);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;end;</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script><br>
<br>
В sMemo2 получается:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&#60;A href=&quot;http://www.google.ru/url?url=http://www.elle.ru/tests/&amp;rct=j&amp;frm=1&amp;q=&amp;esrc=s&amp;sa=U&amp;ved=0CBMQFjAAahUKEwj4n4380ZnHAhWI2SwKHdhEB2A&amp;usg=AFQjCNFKGc7G2o3Ta0OKGyFYhC8EjSKUHg&quot; target=_blank&#62;&#60;B&#62;?????&#60;/B&#62; ??????: ?????? ??????????????? &#60;B&#62;?????&#60;/B&#62; ?????????, ??? &#60;B&#62;...&#60;/B&#62;&#60;/A&#62;</div></ol></div></div></div></div>				<br>
<br>
Как получить href? Чето не пойму. Спасибо.]]></description>
        <author>strongmaster</author>
        <category>Delphi: Сетевое программирование</category>
      </item>
	
      </channel>
      </rss>
	