【问题标题】:How to find similarity between meta description of a URL and an article?如何找到 URL 的元描述和文章之间的相似性?
【发布时间】:2018-04-11 22:20:54
【问题描述】:

我有一篇文章存储在 .txt 文件中,我通过向 Google 提供一些搜索查询来从网络上获取各种文章的元描述。我需要比较元描述和文章。我应该使用哪种技术来做到这一点?

【问题讨论】:

  • 你试过什么?你试过什么吗?如果没有,如果您遇到特定代码段,请快速搜索一下并编辑您的问题。

标签: python google-search similarity


【解决方案1】:

您可以尝试使用 IN 函数查看字符串是否存在。

例如:

lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit."

if "Dr.Evil" in lorem:
    print("Found it")
else:
    print("Didn't find it")

【讨论】:

    猜你喜欢
    • 2021-03-29
    • 1970-01-01
    • 2014-07-01
    • 2012-04-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多