简体   繁体   English

如何获取由搜索引擎抓取的动态加载的数据?

[英]How to get dynamically loaded data crawled by search engines?

I am facing a issue where on website, we have navigation tabs on header, on hovering drop down appears and data is populated and shown to user. 我遇到一个问题,在网站上,标题上有导航选项卡,悬停时会出现下拉菜单,并填充数据并将其显示给用户。 This data is dynamically generated and hence it wont appear on Page source. 此数据是动态生成的,因此不会出现在Page源中。 When researched, google crawlers crawls whatever present in page source. 经过研究,Google搜寻器会搜寻网页源中存在的所有内容。 Though they wont crawl script tags. 虽然他们不会抓取脚本标签。

Now my data is JSON data which is inside script tag and it appears on page source. 现在我的数据是脚本标记内的JSON数据,并显示在页面源代码中。 This JSON data is used to populate results on navigation tabs using javascript. 此JSON数据用于使用javascript在导航标签上填充结果。

I want this data to be crawled by search engines. 我希望搜索引擎对这些数据进行爬网。

Is there a way to do this? 有没有办法做到这一点?

If is not present in DOM, then is not searchable, they wont crawl on it. 如果DOM中不存在,则无法搜索,他们将不会在DOM上进行爬网。 It need to be in DOM so they will find it. 它必须在DOM中,以便他们找到它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM