在Google自定义搜索中使用TBS(或等效参数) [英] Using the TBS (or equivalent parameter) in Google Custom Search

查看:154
本文介绍了在Google自定义搜索中使用TBS(或等效参数)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 Google自定义搜索时,似乎不支持使用TBM参数选择特定类型的搜索引擎(例如,专利的tbm = pts或博客的tbm = blg)记录在参数列表中.

When using Google Custom Search the TBM parameter for selecting specific types of search engines (e.g. tbm=pts for patents or tbm=blg for blogs) seems to be supported even though this isn't properly documented in the list of parameters.

但是,当使用这种特殊"搜索时,通常使用TBS参数来扩展查询,但是不幸的是,这对我不起作用.例如: https://www.google.com/?tbm=pts&gws_rd=ssl#q=touch+screen&tbas=0&tbs=ptss:g,ptso:us&tbm=pts 从浏览器发布时可以正确过滤.

However when using such "special" searches one usually extend the query by using the TBS parameter, unfortunately this doesn't work for me. For example: https://www.google.com/?tbm=pts&gws_rd=ssl#q=touch+screen&tbas=0&tbs=ptss:g,ptso:us&tbm=pts filters correctly when posted from a browser.

但等效的自定义搜索: https://www.googleapis.com/customsearch/v1?key=*MY_KEY*&cx=*MY_ENGINE*&tbm=pts&q=lice+comb&tbs=ptss:g 完全忽略TBS参数.

But the equivalent custom search: https://www.googleapis.com/customsearch/v1?key=*MY_KEY*&cx=*MY_ENGINE*&tbm=pts&q=lice+comb&tbs=ptss:g Completely ignores the TBS parameter.

是否可以在自定义搜索中指定等效参数?

Is there a way to specify an equivalent parameter in custom search?

推荐答案

在控制面板"中将图像搜索设置为打开,以生成单独的图像"选项卡(可以设置为默认值).如果要编辑现有的CSE,则在左栏中的搜索功能"下,然后单击图像搜索设置".您可以编辑设置,但指定图像类型(例如,人脸)不是其中之一-另请参见"> https://support.google.com/customsearch/answer/3037004?hl=zh_CN&topic=3036698 如果您想做其他类似的事情,最好创建一系列书签(可以轻松地与 https://w-shadow.com/bookmarklet-combiner/)或通过您自己的JS增强网页,您可以在其中构建所有这些参数.

Set image search on in the Control Panel to generate a separate Image tab (can set to default). If you're editing an existing CSE, it's under Search Features in left-hand column, then click Imagesearch Settings. You can edit settings, but specifying image type (e.g., Faces) isn't one of them - also see https://support.google.com/customsearch/answer/2630972?hl=en&ref_topic=4513743 and https://support.google.com/customsearch/answer/3037004?hl=en&topic=3036698 If you want to do additional things like that, you're probably better off creating a series of bookmarklets (easily shareable with a free tool like https://w-shadow.com/bookmarklet-combiner/ ) or via your own JS-enhanced webpage where you can build in all those parameters.

这篇关于在Google自定义搜索中使用TBS(或等效参数)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆