从一组网站中获取希伯来语名称
我有以下网站(希伯来语): http://www.daydeals.co.il/
它包含许多指向外部网站的链接。 我想写一个 jQuery 脚本 1)打开所有链接 2)从所有包含文本“someText”的开放网站收集元素 3)返回(2)中所有元素的集合
有人可以指导我如何做到这一点吗?
另一个问题: 我尝试使用以下 jq 选择器: Alert($("div:contains('אבב')").text());
然而,当我在任何浏览器中浏览此内容时,希伯来语就会变成乱码。有办法克服这个吗?
提前致谢
I have the following website (hebrew):
http://www.daydeals.co.il/
It contains many links to external websites.
I want to write a jQuery script that will
1) open all the links
2) collect the elements from all the open websites that contains the text "someText"
3) return a collection of all the elements from (2)
Could someone please guid me how to do this?
another question:
I tried to use the follwing jq selector:
alert($("div:contains('אביב')").text());
however when I browse this in any browser the hebrew turns to gibrish. Any way to over come this?
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
由于跨站点脚本限制,浏览器将不允许您访问另一个页面通过 JavaScript 获取域名。您将无法从外部网站读取或收集数据。您可以使用 PHP、Perl 或 Java 等服务器端脚本来完成此操作。
您是否安装了希伯来语版本的浏览器?
Due to cross-site scripting restrictions, the browser will not let you access a page on another domain via JavaScript. You will not be able to read from or collect data from an external website. You can do this with a server-side scripting like PHP, Perl or Java.
Do you have the Hebrew language version of the browser installed?
尝试Web-Harvest。
它非常适合此类任务。
它的默认工作字符集是 UTF-8,因此如果希伯来语网站使用 UTF-8,它应该可以使用。
您还可以在
元素。Try Web-Harvest.
It's perfect for such tasks.
It's default working charset is UTF-8, so it should work with Hebrew sites, if they use UTF-8.
You also can define another charset in the
<config>
element.