<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Получение ссылок атрибута "href"]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=11708&amp;type=atom" />
	<updated>2016-06-11T17:03:32Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=11708</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Получение ссылок атрибута "href"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=105141#p105141" />
			<content type="html"><![CDATA[<p>Как-то так:<br /></p><div class="codebox"><pre><code>link := &quot;http://www.nastol.com.ua/beautiful/177237-gotika-kostel-sobor.html&quot;
http := ComObjCreate(&quot;WinHttp.WinHttpRequest.5.1&quot;)
http.Open(&quot;POST&quot;, link)
http.Send()
html := http.ResponseText
http := &quot;&quot;
document := ComObjCreate(&quot;HTMLfile&quot;)
document.Open()
document.Close()
document.body.innerHTML := html
links := document.links
Loop % links.length
	hrefs .= (A_Index = 1 ? &quot;&quot; : &quot;`n&quot;) . links[A_Index-1].href
document := &quot;&quot;
MsgBox, % hrefs</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2016-06-11T17:03:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=105141#p105141</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Получение ссылок атрибута "href"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=105138#p105138" />
			<content type="html"><![CDATA[<p>Сегодня до компьютера, может, не доберусь, так что если кто-то другой подскажет, я не против.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2016-06-11T14:32:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=105138#p105138</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Получение ссылок атрибута "href"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=105132#p105132" />
			<content type="html"><![CDATA[<p>Пример: <a href="http://www.nastol.com.ua/beautiful/177237-gotika-kostel-sobor.html">http://www.nastol.com.ua/beautiful/1772 … sobor.html</a></p>]]></content>
			<author>
				<name><![CDATA[SeaVodikendu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33752</uri>
			</author>
			<updated>2016-06-11T13:12:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=105132#p105132</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Получение ссылок атрибута "href"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=105130#p105130" />
			<content type="html"><![CDATA[<p>Тогда вам нужно привести конкретный пример html-страницы.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2016-06-11T12:28:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=105130#p105130</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Получение ссылок атрибута "href"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=105129#p105129" />
			<content type="html"><![CDATA[<p>Возможно я путаю это понятие школьной программы.<br />Я имел ввиду, выводит все, кроме прямых ссылок на скачивание.<br />Нужно чтобы скрипт их выводил.</p>]]></content>
			<author>
				<name><![CDATA[SeaVodikendu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33752</uri>
			</author>
			<updated>2016-06-11T12:26:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=105129#p105129</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Получение ссылок атрибута "href"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=105126#p105126" />
			<content type="html"><![CDATA[<p>Мне кажется, у вас какая-то путаница. <br /></p><div class="quotebox"><blockquote><p>Сейчас почему-то он &quot;вытаскивает&quot; только гиперссылки.</p></blockquote></div><p>Для начала, что вы называете «гиперссылкой», а что не «гиперссылкой»?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2016-06-11T12:11:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=105126#p105126</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Получение ссылок атрибута "href"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=105115#p105115" />
			<content type="html"><![CDATA[<p>Здравствуйте.<br />Мне нужно с определенного сайта получить все гиперссылки в т.ч. прямые ссылки на скачивание файлов, имеющие атрибут &quot;href&quot;.<br />Раньше работал такой скрипт:<br /></p><div class="codebox"><pre><code>
wb := ComObjCreate(&quot;InternetExplorer.Application&quot;)
wb.Visible := False		
wb.navigate(&quot;сайт&quot;)
While wb.readyState!=4 || wb.document.readyState!=&quot;complete&quot; || wb.busy
Sleep 50
Loop % wb.document.links.length
{
item := wb.document.links.item[A_Index]
link := item.href
wb.document.links.item[A_Index].Click()
FileAppend, %link% `n, %path%links.txt
}</code></pre></div><p>Сейчас почему-то он &quot;вытаскивает&quot; только гиперссылки.</p><p>В консоли любого браузера команда &quot;document.getElementsByClassName(&quot;file_name&quot;)[].href&quot;, выводит запрашиваемый линк, но в скрипте это не работает.<br /></p><div class="codebox"><pre><code>
pwb := ComObjCreate( &quot;InternetExplorer.Application&quot; )
pwb.Visible := false
pwb.Navigate(&quot;сайт&quot;)
while, pwb.busy
	sleep, 10
MsgBox, % pwb.document.getElementsByClassName(&quot;file_name&quot;)[a_index].href</code></pre></div><p>Прошу помощи.</p>]]></content>
			<author>
				<name><![CDATA[SeaVodikendu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33752</uri>
			</author>
			<updated>2016-06-11T10:34:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=105115#p105115</id>
		</entry>
</feed>
