【问题标题】:How to search across multiple sites using google search?如何使用谷歌搜索跨多个站点进行搜索?
【发布时间】:2020-12-13 18:21:49
【问题描述】:

给定这个 URL,我可以在 Google 上对查询字符串中指定的站点进行站点搜索:

https://www.google.com/search?q=something&sitesearch=subdomain1.site-abc.com

这会在 Google 搜索文本框中生成以下格式化字符串:

something site:subdomain1.site-abc.com

我也可以轻松地为此编写一个简单的 html 表单,如下所示:

<form method="get" action="https://www.google.com/search" target="_blank">
    <input type="text"   name="q" size="31" maxlength="255" value="Keyword" />
    <input type="submit" value="Google Search" class="button1" />
    <input type="radio"  name="sitesearch" value="subdomain1.site-abc.com" checked="checked" /> Search subdomain1.site-abc.com on Google<br />
</form>

现在,如果我想跨多个网站进行搜索,我可以在 Google 上使用搜索文本框中的以下任一查询来实现:

1. something site:subdomain1.site-abc.com OR subdomain2.site-abc.com
2. something site:subdomain1.site-abc.com || subdomain2.site-abc.com
3. something site:subdomain1.site-abc.com | subdomain2.site-abc.com

我的问题是,URL 中的查询字符串应该是什么样子才能在 Google 搜索文本框中获得上述结果之一?

我尝试了这些方法,但它们不起作用:

https://www.google.com/search?q=something&sitesearch=subdomain1.site-abc.com%2B||%2Bsubdomain2.site-abc.com

https://www.google.com/search?q=something&sitesearch=subdomain1.site-abc.com%20||%20subdomain2.site-abc.com

第一个 URL 结果如下:

something site:subdomain1.site-abc.com+||+subdomain2.site-abc.com

第二个 URL 结果如下:

something site:subdomain1.site-abc.com%20||%20subdomain2.site-abc.com

有什么建议吗?

【问题讨论】:

  • sitesearch URL 参数是否记录在任何地方?或者你是怎么找到的?
  • 过去曾经在谷歌搜索文档中记录过。我在我管理的一个网站上有这个功能,我真的在 5-6 年后重新访问这个功能。不再记录该参数也就不足为奇了,因为谷歌现在大力推销此功能。

标签: html url google-search


【解决方案1】:

手术室对我来说效果很好。这里是一个例子example site:github.com OR site:gitlab.com OR site:bitbucket.org after:2018-01-01

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-02-09
    • 1970-01-01
    相关资源
    最近更新 更多