gpt4 book ai didi

c# - 从外部 URL 中提取文本

转载 作者:行者123 更新时间:2023-11-30 21:18:22 24 4
gpt4 key购买 nike

我正在制作类似 facebook 的共享链接功能。目前我正在解析元标记以获取关键字、描述等,但如何解析这些类型的页面 http://en.wikipedia.org/wiki/Wikipedia此页面没有元描述,但 facebook 仍获取以下描述:维基百科(/ˌwɪkɪpiːdi.ə/或/ˌwɪkipiːdi.ə/WIK-i-PEE-dee-ə)是一个免费的、[3]基于网络的协作性多语言百科全书项目,由非营利性维基媒体基金会提供支持.它的 1700 万篇文章(超过 340 万篇英文文章)是由世界各地的志愿者共同撰写的。

如果在页面上找不到元描述标签,我如何提取这样的描述。

最佳答案

看起来他们以相同的方式生成描述 Bing执行哪些操作可能难以轻松地重新创建:

How does Bing generate a description of my Web site?

The way you design your Web page content has the greatest impact on your Web page description. As MSNBot crawls your Web site, it analyzes the content on indexed Web pages and generates keywords to associate with each Web page. MSNBot extracts Web page content that is most relevant to the keywords, and constructs the Web site description that appears in search results. The Web page content is typically sentence segments that contain keywords or information in the description tag. The Web page title and URL are also extracted and appear in the search results.

If you change the contents of a Web page, your Web page description might change the next time the Bing index is updated. To influence your Web site description, make sure that your Web pages effectively deliver the information you want in the search results. Webmaster Center recommends the following strategies when you design your content:

* Place descriptive content near the top of each Web page.
* Make sure that each Web page has a clear topic and purpose.
* Create unique <title> tag content for each page.
* Add a Web site description <meta> tag to describe the purpose of

each page on your site. For example:

> <META NAME="Description"
> CONTENT="Sample text - describe your

http://www.bing.com/toolbox/support/faqs.aspx

一种选择是点击 Bing 并尝试从那里获取描述。

关于c# - 从外部 URL 中提取文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4286550/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com