【问题标题】:Filter Google Custom Search for pages that contain a specific metatag过滤包含特定元标记的页面的 Google 自定义搜索
【发布时间】:2020-11-18 14:36:32
【问题描述】:

我一直在尝试将我的谷歌自定义搜索过滤到专门包含如下图所示结构的元标记的页面:

<meta data-rh="true" id="meta-og-image" property="og:image" content="https://xxx.jpg"/>

当我从 GCS 获取 JSON 时,我可以看到元标记:

    "metatags": [
      {
        "og:image": "xxx.jpg",
        "theme-color": "#fff",...

是否可以制作一个 GET 命令,在 URL 中通知只有具有该特定元标记的页面才应该是结果的一部分?

由于 google 每次 CGS 请求仅返回 10 个项目,并且找到的项目总数远大于 1000 个,因此我需要过滤搜索本身而不是爬取结果。

直到现在才能让它工作。

感谢支持!

【问题讨论】:

  • 我可以按结构化数据过滤吗?前产品数据?

标签: api search filter meta-tags google-custom-search


【解决方案1】:

more:pagemap:metatags:og_image 之类的查询将返回具有 og:image 元标记的页面

了解更多:https://developers.google.com/custom-search/docs/structured_search

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-09-02
    • 2011-01-22
    • 2021-10-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多