<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Парсинг страницы]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=13647&amp;type=atom" />
	<updated>2018-05-08T22:33:56Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=13647</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Парсинг страницы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125258#p125258" />
			<content type="html"><![CDATA[<p>Всё-таки в данном случае правильней, наверное, так:<br /></p><div class="codebox"><pre><code>text = 
(
&lt;title&gt;test&lt;/title&gt;
&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=EDGE&quot;&gt;
&lt;div&gt;div&lt;/div&gt;
&lt;script&gt;скрипт не должен быть виден&lt;/script&gt; а это должно
)

oHTML := ComObjCreate(&quot;HtmlFile&quot;)
oHTML.write(&quot;&lt;meta http-equiv=&quot;&quot;X-UA-Compatible&quot;&quot; content=&quot;&quot;IE=8&quot;&quot;&gt;&quot;)   ; не смотря на значения в реестре или хтмл файле, будет работать в режиме совместимости IE8
oHTML.write(text)
msgbox % oHTML.documentmode
msgbox % oHTML.body.innerText</code></pre></div><p>Так как при режиме совместимости 9 и выше цепляется текст внутри тага script:<br /></p><div class="codebox"><pre><code>text = 
(
&lt;title&gt;test&lt;/title&gt;
&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=EDGE&quot;&gt;
&lt;div&gt;div&lt;/div&gt;
&lt;script&gt;скрипт не должен быть виден&lt;/script&gt; а это должно
)

oHTML := ComObjCreate(&quot;HtmlFile&quot;)
oHTML.write(&quot;&lt;meta http-equiv=&quot;&quot;X-UA-Compatible&quot;&quot; content=&quot;&quot;IE=9&quot;&quot;&gt;&quot;)
oHTML.write(text)
msgbox % oHTML.documentmode
msgbox % oHTML.body.innerText</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-05-08T22:33:56Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125258#p125258</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Парсинг страницы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=124945#p124945" />
			<content type="html"><![CDATA[<p><span style="color: grey">У меня восьмой соответсвенно.</span><br />Оказалось что в .documentElement попадает еще и содержимое тега &lt;title&gt;, так что ваш способ корректнее.</p>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2018-04-26T20:07:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=124945#p124945</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Парсинг страницы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=124942#p124942" />
			<content type="html"><![CDATA[<p>Думаю mshtml.dll.<br />У меня он 11.00.9600.18978.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-04-26T17:43:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=124942#p124942</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Парсинг страницы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=124940#p124940" />
			<content type="html"><![CDATA[<p>Встроенная восьмая, интересно какая конкретно из подключенных библиотек влияет:<br /></p><div class="codebox"><pre><code>ieframe.dll
mshtml.dll
winhttp.dll
urlmon.dll
jscript.dll
webio.dll
wininet.dll</code></pre></div>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2018-04-26T17:25:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=124940#p124940</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Парсинг страницы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=124938#p124938" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>stealzy пишет:</cite><blockquote><p>У меня одинаково верный результат в обоих случаях.</p></blockquote></div><p>У меня в первом варианте выводит &quot;скрипт не должен быть виден а это должно&quot;.<br />Во втором же - &quot; а это должно&quot;.<br />Какая у вас полная версия IE?</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-04-26T16:23:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=124938#p124938</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Парсинг страницы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=124931#p124931" />
			<content type="html"><![CDATA[<p>Спасибо, всё работает.</p>]]></content>
			<author>
				<name><![CDATA[seriyforum]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39171</uri>
			</author>
			<updated>2018-04-26T13:07:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=124931#p124931</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Парсинг страницы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=124923#p124923" />
			<content type="html"><![CDATA[<p><strong>stealzy</strong>, не, просто ваш вариант не совсем верный:<br /></p><div class="codebox"><pre><code>text = 
(
&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=Edge&quot;&gt;
&lt;script&gt;скрипт не должен быть виден&lt;/script&gt; а это должно
)

oHTML := ComObjCreate(&quot;HtmlFile&quot;)
oHTML.write(text)
msgbox %  oHTML.documentElement.innerText

document := ComObjCreate(&quot;HTMLfile&quot;)
document.Open()
document.Close()
document.body.innerHTML := text
msgbox % document.body.innerText</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-04-26T09:38:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=124923#p124923</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Парсинг страницы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=124904#p124904" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>seriyforum пишет:</cite><blockquote><p>Можно но ли как-то из этого получить простой текст, который отображается на сайте без лишнего html и java кода</p></blockquote></div><p>Можно через HTMLfile:<br /></p><div class="codebox"><pre><code>document := ComObjCreate(&quot;HTMLfile&quot;)
document.Open()
document.Close()
document.body.innerHTML := WebRequest.ResponseText
msgbox % document.body.innerText</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-04-25T21:36:57Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=124904#p124904</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Парсинг страницы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=124900#p124900" />
			<content type="html"><![CDATA[<p>Такая тема уже была, пользуйтесь поиском: <a href="http://forum.script-coding.com/viewtopic.php?id=9394">http://forum.script-coding.com/viewtopic.php?id=9394</a>.</p>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2018-04-25T18:16:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=124900#p124900</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Парсинг страницы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=124896#p124896" />
			<content type="html"><![CDATA[<p>Спасибо получилось, но немного не так как я хотел, он копирует код страницы со всеми элементами.<br />Можно но ли как-то из этого получить простой текст, который отображается на сайте без лишнего html и java кода</p>]]></content>
			<author>
				<name><![CDATA[seriyforum]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39171</uri>
			</author>
			<updated>2018-04-25T14:41:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=124896#p124896</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Парсинг страницы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=124894#p124894" />
			<content type="html"><![CDATA[<p>Get отправляем, чтобы получить информацию.<br />Post, чтобы отправить.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-04-25T14:30:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=124894#p124894</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Парсинг страницы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=124892#p124892" />
			<content type="html"><![CDATA[<p>Я переделывал код под себя,&nbsp; взяв его на просторах данного форума)</p>]]></content>
			<author>
				<name><![CDATA[seriyforum]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39171</uri>
			</author>
			<updated>2018-04-25T14:27:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=124892#p124892</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Парсинг страницы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=124891#p124891" />
			<content type="html"><![CDATA[<p>Вы в своем коде зачем-то вначале отправляете get запрос:<br /></p><div class="codebox"><pre><code>WebRequest := ComObjCreate(&quot;WinHttp.WinHttpRequest.5.1&quot;)
WebRequest.Open(&quot;GET&quot;, url)
WebRequest.Send()</code></pre></div><p>А потом post:<br /></p><div class="codebox"><pre><code>loginBody := &quot;form_sent=1&amp;redirect_url=http%3A%2F%2Fulog.union-u.net%2Flogin.php&amp;mail=&quot; login &quot;&amp;pass=&quot; password &quot;&amp;login=%D0%92%D0%BE%D0%B9%D1%82%D0%B8&quot;
WebRequest.Open(&quot;POST&quot;, url)
WebRequest.SetRequestHeader(&quot;Content-Type&quot;,&quot;application/x-www-form-urlencoded&quot;)
WebRequest.Send(loginBody)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-04-25T14:26:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=124891#p124891</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Парсинг страницы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=124890#p124890" />
			<content type="html"><![CDATA[<p>Как это сделать?</p>]]></content>
			<author>
				<name><![CDATA[seriyforum]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39171</uri>
			</author>
			<updated>2018-04-25T14:19:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=124890#p124890</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Парсинг страницы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=124889#p124889" />
			<content type="html"><![CDATA[<p>Исходный код страницы находится в переменной WebRequest.ResponseText.<br />Посылаете get запрос по нужной вам ссылке и должны получить.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-04-25T14:05:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=124889#p124889</id>
		</entry>
</feed>
