<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Извлеч json из &lt;script&gt;]]></title><description><![CDATA[[[topic:post_is_deleted]]]]></description><link>http://community.bablosoft.com/topic/6642/извлеч-json-из-script</link><generator>RSS for Node</generator><lastBuildDate>Sun, 01 Nov 2026 08:31:06 GMT</lastBuildDate><atom:link href="http://community.bablosoft.com/topic/6642.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 12 Feb 2019 08:25:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Извлеч json из &lt;script&gt; on Tue, 12 Feb 2019 19:16:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.bablosoft.com/uid/394">@fox</a> если дейтвие получить элемент - да. Если получить текст - нет</p>
]]></description><link>http://community.bablosoft.com/post/43091</link><guid isPermaLink="true">http://community.bablosoft.com/post/43091</guid><dc:creator><![CDATA[DrPrime]]></dc:creator><pubDate>Tue, 12 Feb 2019 19:16:52 GMT</pubDate></item><item><title><![CDATA[Reply to Извлеч json из &lt;script&gt; on Tue, 12 Feb 2019 16:22:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.bablosoft.com/uid/155">@drprime</a> said in <a href="/post/43074">Извлеч json из &lt;script&gt;</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.bablosoft.com/uid/394">@fox</a> eval() и он будет доступен. Тем более там нет обьектов браузера, так что ничего не мешает</p>
</blockquote>
<p dir="auto">Я тоже иногда пользуюсь <strong>eval()</strong>, но в этом конкретном случае он выдаст ошибку. Так как объект <strong>BACKEND</strong> не объявлен.</p>
<hr />
<p dir="auto">Интересно, а <strong>xpath</strong> выдаст код, вместе с <strong>&lt;![CDATA[</strong>?</p>
]]></description><link>http://community.bablosoft.com/post/43077</link><guid isPermaLink="true">http://community.bablosoft.com/post/43077</guid><dc:creator><![CDATA[Fox]]></dc:creator><pubDate>Tue, 12 Feb 2019 16:22:43 GMT</pubDate></item><item><title><![CDATA[Reply to Извлеч json из &lt;script&gt; on Tue, 12 Feb 2019 14:58:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.bablosoft.com/uid/394">@fox</a> eval() и он будет доступен. Тем более там нет обьектов браузера, так что ничего не мешает</p>
]]></description><link>http://community.bablosoft.com/post/43074</link><guid isPermaLink="true">http://community.bablosoft.com/post/43074</guid><dc:creator><![CDATA[DrPrime]]></dc:creator><pubDate>Tue, 12 Feb 2019 14:58:37 GMT</pubDate></item><item><title><![CDATA[Reply to Извлеч json из &lt;script&gt; on Tue, 12 Feb 2019 14:01:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.bablosoft.com/uid/155">@drprime</a> said in <a href="/post/43062">Извлеч json из &lt;script&gt;</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.bablosoft.com/uid/394">@fox</a> лучший варинт - xpath - получить каждый текст //script<br />
Из списка выюрать нужный Вам</p>
</blockquote>
<p dir="auto">Я тоже сперва хотел через <strong>xpath</strong>, но через него не получится забрать только <strong>json</strong> из кода тега <strong>script</strong></p>
]]></description><link>http://community.bablosoft.com/post/43068</link><guid isPermaLink="true">http://community.bablosoft.com/post/43068</guid><dc:creator><![CDATA[Fox]]></dc:creator><pubDate>Tue, 12 Feb 2019 14:01:24 GMT</pubDate></item><item><title><![CDATA[Reply to Извлеч json из &lt;script&gt; on Tue, 12 Feb 2019 13:39:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.bablosoft.com/uid/394">@fox</a> лучший варинт - xpath - получить каждый текст //script<br />
Из списка выюрать нужный Вам</p>
]]></description><link>http://community.bablosoft.com/post/43062</link><guid isPermaLink="true">http://community.bablosoft.com/post/43062</guid><dc:creator><![CDATA[DrPrime]]></dc:creator><pubDate>Tue, 12 Feb 2019 13:39:04 GMT</pubDate></item><item><title><![CDATA[Reply to Извлеч json из &lt;script&gt; on Tue, 12 Feb 2019 10:45:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.bablosoft.com/uid/1696">@john_bradley</a> said in <a href="/post/42997">Извлеч json из &lt;script&gt;</a>:</p>
<blockquote>
<p dir="auto">Здравствуйте, подскажите как из тега script извлечь только json</p>
</blockquote>
<p dir="auto">Например вот так:</p>
<pre><code>sellersOffers = (\{[\s\S]*?\});
</code></pre>
<p dir="auto"><a href="https://regex101.com/r/9Zo5Ye/1" rel="nofollow ugc">https://regex101.com/r/9Zo5Ye/1</a></p>
]]></description><link>http://community.bablosoft.com/post/43018</link><guid isPermaLink="true">http://community.bablosoft.com/post/43018</guid><dc:creator><![CDATA[Fox]]></dc:creator><pubDate>Tue, 12 Feb 2019 10:45:54 GMT</pubDate></item><item><title><![CDATA[Reply to Извлеч json из &lt;script&gt; on Tue, 12 Feb 2019 08:42:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.bablosoft.com/uid/1696">@john_bradley</a><br />
RegExp</p>
]]></description><link>http://community.bablosoft.com/post/42999</link><guid isPermaLink="true">http://community.bablosoft.com/post/42999</guid><dc:creator><![CDATA[xclsv]]></dc:creator><pubDate>Tue, 12 Feb 2019 08:42:43 GMT</pubDate></item></channel></rss>