如何使用谷歌搜索跨多个站点进行搜索? [英] How to search across multiple sites using google search?
问题描述
给定这个 URL,我可以在查询字符串中指定的站点上在 Google 上进行站点搜索:
Given this URL, I can do a site search across the site specified in the query string, on Google:
https://www.google.com/search?q=something&sitesearch=subdomain1.site-abc.com
这会在 Google 搜索文本框中生成以下格式化字符串:
This results in the following formatted string in the Google search text box:
something site:subdomain1.site-abc.com
我也可以轻松地为此编写一个简单的 html 表单,如下所示:
I can also easily write a simple html form for this, like so:
<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 上执行此操作:
Now, if I want to search across multiple sites, I can do that on Google using either of these queries in the search text box:
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 搜索文本框中获得上述结果之一?
My question is, what should the query string in the URL look like, to get one of the above results in the Google search text box?
我尝试了这些东西,但它们不起作用:
I tried these things but they do not work:
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 结果如下:
First URL results in this:
something site:subdomain1.site-abc.com+||+subdomain2.site-abc.com
第二个 URL 结果如下:
The second URL results in this:
something site:subdomain1.site-abc.com%20||%20subdomain2.site-abc.com
有什么建议吗?
推荐答案
手术室对我来说效果很好.这里是一个示例 example site:github.com OR site:gitlab.com OR site:bitbucket.org after:2018-01-01
The OR is working well for me. Here an example example site:github.com OR site:gitlab.com OR site:bitbucket.org after:2018-01-01
这篇关于如何使用谷歌搜索跨多个站点进行搜索?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!