问题标签 [google-crawlers]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
3439 浏览

ruby-on-rails - ActionView::MissingTemplate:缺少模板主页/索引 - Google 爬虫

我在网站上启动 Google Crawler 时遇到此错误:

错误信息:

ActionView::MissingTemplate: 缺少模板主页/索引、应用程序/索引与 {:locale=>[:fr], :formats=>["image/*"], :handlers=>[:erb, :builder, :haml ]}。在以下位置搜索:*“/home/custodir/apps/default/releases/32/app/views”*“/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/ckeditor-4.0.10 /app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/rails_admin-0.4.9/app/views" * "/home/custodir/apps/default/shared /bundle/ruby/2.0.0/gems/kaminari-0.15.1/app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/devise-2.1.4/应用程序/视图”

SO研究:

我注意到这 3 个相关问题: ActionView::MissingTemplate -> 我没有使用 HAML

ActionView::MissingTemplate: 缺少模板-> 不相关

Googlebot 收到现有模板的缺失模板错误-> 尝试了 gem“rails_fix_google_bot_accept”没有区别。

更多细节:

Errbit 表示可能的错误: 88.4%

ActionView::MissingTemplate: 缺少模板主页/索引、应用程序/索引与 {:locale=>[:fr], :formats=>["image/*"], :handlers=>[:erb, :builder, :haml ]}。在以下位置搜索:*“/home/custodir/apps/default/releases/30/app/views”*“/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/ckeditor-4.0.10 /app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/rails_admin-0.4.9/app/views" * "/home/custodir/apps/default/shared /bundle/ruby/2.0.0/gems/kaminari-0.15.1/app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/devise-2.1.4/应用程序/视图”

7.4%

ActionView::MissingTemplate: 缺少模板主页/索引、应用程序/索引与 {:locale=>[:fr], :formats=>[:css], :handlers=>[:erb, :builder, :haml]}。在以下位置搜索:*“/home/custodir/apps/default/releases/30/app/views”*“/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/ckeditor-4.0.10 /app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/rails_admin-0.4.9/app/views" * "/home/custodir/apps/default/shared /bundle/ruby/2.0.0/gems/kaminari-0.15.1/app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/devise-2.1.4/应用程序/视图”

2.5%

ActionView::MissingTemplate: 缺少模板主页/索引、应用程序/索引与 {:locale=>[:fr], :formats=>["image/*"], :handlers=>[:erb, :builder, :haml ]}。在以下位置搜索:*“/home/custodir/apps/default/releases/32/app/views”*“/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/ckeditor-4.0.10 /app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/rails_admin-0.4.9/app/views" * "/home/custodir/apps/default/shared /bundle/ruby/2.0.0/gems/kaminari-0.15.1/app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/devise-2.1.4/应用程序/视图”

1.7%

ActionView::MissingTemplate: 缺少模板主页/索引、应用程序/索引与 {:locale=>[:fr], :formats=>["image/*"], :handlers=>[:erb, :builder, :haml ]}。在以下位置搜索:*“/home/custodir/apps/default/releases/24/app/views”*“/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/ckeditor-4.0.10 /app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/rails_admin-0.4.9/app/views" * "/home/custodir/apps/default/shared /bundle/ruby/2.0.0/gems/kaminari-0.15.1/app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/devise-2.1.4/应用程序/视图”

完整回溯: https ://gist.github.com/YOUConsulting/a59e134a98b4d5bc1438

HTTP_ACCEPT:
图像/*

HTTP_USER_AGENT:
Mozilla/5.0 (Windows NT 6.1; rv:6.0) Gecko/20110814 Firefox/6.0 Google favicon

参数:

{“动作”=>“索引”,“控制器”=>“家”}

更新 1:添加 HomeController 索引

0 投票
1 回答
728 浏览

java - HtmlUnit 拍摄 Ajax 应用程序的快照

我创建了一个基本的 GWT (Google Web Toolkit) Ajax 应用程序,现在我正在尝试为读取页面的爬虫创建快照

我使用 HtmlUnit 创建了一个 Servlet 来响应爬虫。

当我在浏览器上时,我的应用程序运行良好。但是在 HtmlUnit 中,它会引发很多关于我在 HTML 中的特殊字符的错误。但是这些字符是内容,我不想用特殊代码替换它,一旦它当前工作,只是因为 HtmlUnit。(至少我应该先检查一下我是否正确使用了 HtmlUnit)

我的页面有错误

我认为 HtmlUnit 应该读取页面的字符集信息并将其呈现为浏览器,一旦它是我认为的项目目标。

我还没有找到关于这个问题的好信息。这是 HtmlUnit 限制吗?我是否需要更改我网站的所有内容才能使用这个 java 库来拍摄快照?

这是我的代码:

0 投票
2 回答
58 浏览

bots - 如果用户代理是 google bot,则不显示图表的缺点

就谷歌抓取而言,我们在页面上加载的图表有点慢。由于图表不包含任何 SEO 内容,如果它是谷歌机器人,是否建议用户代理检查不加载图表。

我们这样做的主要目的主要是降低爬行速度。

有什么缺点吗??

0 投票
2 回答
757 浏览

java - Java Servlet - 重定向 URL

我网站的 URLwww.example.com/?id=THEPRODUCTID#iTHEPRODUCTID一个字母数字字符串。请注意,#i 出现在末尾。

问题是谷歌爬虫忽略了#i指定的Sitemap.xml,所以我在谷歌上看到的结果是www.example.com/?id=THEPRODUCTID

作为一个快速的解决方案,我想创建一个重定向www.example.com/?id=THEPRODUCTIDwww.example.com/?id=THEPRODUCTID#i. 我不确定如何进行映射,或者它是否应该是过滤器、重定向、转发……非常感谢任何指导。

0 投票
1 回答
252 浏览

hadoop - google爬虫的重爬策略

我想知道一些大型搜索引擎的重新抓取策略是如何工作的。例如让我们考虑谷歌。我们知道谷歌正在使用动态间隔来重新抓取每个网站。假设根据谷歌动态间隔,每 10 分钟应该重新抓取 10 万个站点。所以这 100000 个网站的爬取过程应该在 10 分钟内完成。大概有两种可能的情况:

1) google bot 将获取每个站点的第一页,然后生成该页面中的 URL 列表。对于每个 URL,它会检查该 URL 之前是否被获取。如果它是新的,它将获取新页面。此过程将一直持续到爬网结束或特定深度阈值。

2) google bot 将再次获取每个页面(无论它是否已更新)

假设 google 使用第一种策略,那么具有相同 url 但内容更新的页面将如何被抓取和索引?假设谷歌使用第二个,那么它如何在不到 10 分钟的时间内重新抓取所有这些页面?其他网页呢?可能有超过 60 亿个网页可用,如何及时重新抓取所有这些网页?我真的认为在 hadoop 基础架构上使用一些新技术(如 nutch 和 solr)是不可能的。

问候。

0 投票
1 回答
79 浏览

gwt - Ajax Base Googlebot 抓取

这是我们上周发布的网站(单页网站)http://www.itslayer.com/

我们在使用 Google Webmaster 工具对此进行测试时遇到了问题。我们根据文档开发了网站 - https://developers.google.com/webmasters/ajax-crawling/docs/getting-started

请告诉我们如何使用 googlebot 测试 Ajax 基础网站以及我们的实现是否正确。

提前感谢您的建议。请建议。

0 投票
1 回答
201 浏览

php - 谷歌站长说 cgi-bin 不可访问

我有一个网站Flamingone.com。几天前,我在 Google 网站管理员上注册了我的网站。今天我检查了谷歌网站管理员为我的网站准备了什么。谷歌说,

“Googlebot 无法抓取您的网址 (/cgi-bin) (flamingone.com/cgi-bin),因为您的服务器需要身份验证才能访问该页面,或者它阻止 Googlebot 访问您的网站。

但我既没有任何名为 cgi-bin 的文件夹,也没有 robots.txt。它应该触发 404(我的 404.php 页面)。为什么显示访问被拒绝?

0 投票
1 回答
1360 浏览

indexing - Soft 404出现在空的内部搜索结果中,怎么办?

根据文章: https://support.google.com/webmasters/answer/181708?hl=en 出现软 404 是因为我的网站中的某些搜索条件没有项目,但我需要这些页面被索引谷歌,为了防止这些错误出现在站长抓取错误中,并确保它们不会影响网站的索引速度,我们应该怎么做?!我们应该返回 404 错误代码吗?我们应该更多地填写所有搜索组合还是忽略它们?!

0 投票
1 回答
285 浏览

javascript - Angularjs 编码偏好查询:在 div 上对 ng-click 进行编码与为谷歌搜索 seo 使用锚点是否不好?

使用 CSS,我可以通过允许用户单击整个列表项而不是其中的锚点来获得更好的外观、感觉和功能。悬停等看起来更好,并且锚标签对顶部和底部填充很挑剔。然而,我不想牺牲谷歌搜索的抓取能力。刚刚加入 Angular 潮流,但从过去的经验中知道锚标签是网站其余部分的关键。Angulars 路由会处理这个问题吗?会增加rel="me"帮助吗?

不管我的问题是 - 哪个更适合谷歌抓取:

或者:

还是根本不重要?

其他代码:

0 投票
1 回答
231 浏览

ajax - Google Crawler Ajax/Php Page

What I have

First of all, how I have I have my site set up is the user is brought to the main screen, there is a dropdown menu with links, when a link is clicked it sends an Integer value to a function that sends 2 AJAX calls, 1 that queries a database for a new title and returns it Json encoded, and 1 one that does the same but for associated data. This is then returned, a big div is cleared and a bunch of dom elements are created holding the new data.

What I Need

I have already rewritten my URLs using the #! hashbang. And on the client side when the hash changes it parses out the parameter and sends it via AJAX to the PHP code that executes as normal. The problem is I need to provide a snapshot of the HTML. 90% of examples I find online create the DOM with the PHP code and then just echo back the completed HTML. The code I use to create the HTML DOM is rather complicated so its done on the javascript side. So they recommend the use of a headless browser. But Im on a shared hosting service so I believe I cannot use a headless browser, and if I can I have no idea how to use a php/java bridge to connect the java code to php, create a snapshot, and return it to google.

EDIT: Is it possible just to have .htaccess redirect any _escaped_fragment_ urls to the #! url?