您可以使用结构化数据标记影片列表,以便用户通过 Google 搜索发现您的影片。您可以提供影片的详细信息,例如影片名称、影片的导演和影片图片。影片轮播界面仅可在移动设备上显示。

如何添加结构化数据
结构化数据是一种提供网页相关信息并对网页内容进行分类的标准化格式。如果您不熟悉结构化数据,可以详细了解结构化数据的工作原理。
下面概述了如何构建、测试和发布结构化数据。如需获得向网页添加结构化数据的分步指南,请查看结构化数据 Codelab。
- 添加必要属性。如需了解如何在网页上放置结构化数据,请观看 JSON-LD 结构化数据:网页上的插入位置。
- 遵循指南。
- 使用富媒体搜索结果测试验证您的代码。
- 部署一些包含您的结构化数据的网页,然后使用网址检查工具测试 Google 看到的网页样貌。请确保您的网页可供 Google 访问,不会因 robots.txt 文件、
noindex
标记或登录要求而被屏蔽。如果网页看起来没有问题,您可以请求 Google 重新抓取您的网址。 - 为了让 Google 随时了解日后发生的更改,我们建议您提交站点地图。Search Console Sitemap API 可以帮助您自动执行此操作。
示例
摘要页面 + 多个完整详情页面
摘要页面中包含列表中每一项的简短说明,每项说明都指向一个单独的详情页面(该页面完全针对一项)。下面是一个 JSON-LD 格式的摘要影片列表示例:
<html> <head> <title>The Best Movies from the Oscars - 2018</title> <script type="application/ld+json"> { "@context":"https://schema.org", "@type":"ItemList", "itemListElement":[ { "@type":"ListItem", "position":1, "url":"http://example.com/a-star-is-born.html" }, { "@type":"ListItem", "position":2, "url":"http://example.com/bohemian-rhapsody.html" }, { "@type":"ListItem", "position":3, "url":"http://example.com/black-panther.html" } ] } </script> </head> <body> </body> </html>
一页全包式单一列表
该列表中包含所有列表信息,其中包括每项的完整内容。 下面是一个 JSON-LD 格式的全包式单一影片列表示例:
<html> <head> <title>The Best Movies from the Oscars - 2018</title> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "ItemList", "itemListElement": [ { "@type": "ListItem", "position": "1", "item": { "@type": "Movie", "url": "https://example.com/2019-best-picture-noms#a-star-is-born", "name": "A Star Is Born", "image": "https://example.com/photos/6x9/photo.jpg", "dateCreated": "2018-10-05", "director": { "@type": "Person", "name": "Bradley Cooper" }, "review": { "@type": "Review", "reviewRating": { "@type": "Rating", "ratingValue": "5" }, "author": { "@type": "Person", "name": "John D." }, "reviewBody": "Heartbreaking, inpsiring, moving. Bradley Cooper is a triple threat." }, "aggregateRating": { "@type": "AggregateRating", "ratingValue": "90", "bestRating": "100", "ratingCount": "19141" } } }, { "@type": "ListItem", "position": "2", "item": { "@type": "Movie", "name": "Bohemian Rhapsody", "url": "https://example.com/2019-best-picture-noms#bohemian-rhapsody", "image": "https://example.com/photos/6x9/photo.jpg", "dateCreated": "2018-11-02", "director": { "@type": "Person", "name": "Bryan Singer" }, "review": { "@type": "Review", "reviewRating": { "@type": "Rating", "ratingValue": "3" }, "author": { "@type": "Person", "name": "Vin S." }, "reviewBody": "Rami Malek's performance is overrated, at best." }, "aggregateRating": { "@type": "AggregateRating", "ratingValue": "61", "bestRating": "100", "ratingCount": "21985" } } }, { "@type": "ListItem", "position": "3", "item": { "@type": "Movie", "name": "Black Panther", "url": "https://example.com/2019-best-picture-noms#black-panther", "image": "https://example.com/photos/6x9/photo.jpg", "dateCreated": "2018-02-16", "director": { "@type": "Person", "name": "Ryan Coogler" }, "review": { "@type": "Review", "reviewRating": { "@type": "Rating", "ratingValue": "2" }, "author": { "@type": "Person", "name": "Trevor R." }, "reviewBody": "I didn't like the lighting and CGI in this movie." }, "aggregateRating": { "@type": "AggregateRating", "ratingValue": "96", "bestRating": "100", "ratingCount": "88211" } } } ] } </script> </head> <body> </body> </html>
指南
您的内容必须遵循以下指南,才能出现在影片轮播界面中。
结构化数据类型定义
要让您的内容能够显示为富媒体搜索结果,您必须为其添加必需的属性。您还可以添加建议的属性,以便添加与您的内容相关的更多信息,进而提供更好的用户体验。
Movie
除了轮播界面属性之外,您还可以在"轮播界面"对象中定义以下属性。
如需了解 Movie
的完整定义,请访问 schema.org/Movie。
必需属性 | |
---|---|
|
URL 或 ImageObject
代表影片的图片。其他图片指南:
|
|
Text
影片的名称。 |
建议属性 | |
---|---|
|
影片所获得的平均评价分数的注释。请遵循评价摘要指南,并查看必需和建议的 AggregateRating 属性列表。 |
|
Date 或 DateTime
影片的上映日期。 |
|
Person
影片的导演。例如: "director": { "@type": "Person", "name": "Bradley Cooper" } |
|
问题排查
如果您在实施结构化数据时遇到问题,请查看下面列出的一些实用资源。
- 您的结构化数据可能存在错误。请参阅结构化数据错误列表。
- 针对富媒体搜索结果缺失/富媒体搜索结果总数下降进行问题排查。
- 有关抓取和索引编制的常见问题,请参阅网站站长常见问题解答。
- 在网站站长 Office Hours 活动中提问。
- 在网站站长论坛中发帖提问。