0
点赞
收藏
分享

微信扫一扫

python报错系列(12)--TypeError: search() got an unexpected keyword argument ‘tld‘

哈哈我是你爹呀 2022-05-01 阅读 66
报错python

系列文章目录

文章目录


前言

一、TypeError: search() got an unexpected keyword argument ‘tld’

#import library 
from googlesearch import search
#write your query
query = "best course for python"
# displaying 10 results from the search
for i in search(query, tld="co.in", num=10, stop=10, pause=2):
    print(i)
#you will notice the 10 search results(website links) in the output.

报错如下:
在这里插入图片描述

二、原因分析

这是由于elasticsearch版本更新导致的,elasticsearch更新到7之后,就没有了doc_type这个参数只需要在原来elasticsearch6代码的基础上删除doc_type这个即可。


总结

分享:
许多年轻人开始做事时都非常狂热,但随着新鲜感的消失就把它们丢到了一边。他们没有稳定的兴趣,他们的工作也只是表面的现象。他们常常有很大潜能,但缺乏敬业精神和持之以恒习惯的培养。

举报

相关推荐

0 条评论