根据此网址,我可以在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
我的问题是,网址中的查询字符串应该是什么样的,以便在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
有什么建议吗?
答案 0 :(得分:0)
OR对我来说运作良好。这里有一个示例example site:github.com OR site:gitlab.com OR site:bitbucket.org after:2018-01-01