fhamborg / news-please

news-please - an integrated web crawler and information extractor for news that just works
Apache License 2.0
1.99k stars 414 forks source link

Newer version of ElasticSearch API changed a lot #247

Closed wang-haoxian closed 1 year ago

wang-haoxian commented 1 year ago

Mandatory

Related issues:

Describe the bug Specially in the pipelines.py the change of ElasticSearch lib made it impossible to use it as a backend. For example, we can have the errors below while using news-please with ElasticSearch.

TypeError: __init__() got an unexpected keyword argument 'port'
TypeError: __init__() got an unexpected keyword argument 'use_ssl'
builtins.ValueError: URL must include a 'scheme', 'host', and 'port' component (ie 'https://localhost:9200')
builtins.TypeError: Positional arguments can't be used with Elasticsearch API methods. Instead only use keyword arguments.
TypeError: index() got an unexpected keyword argument 'doc_type'

To Reproduce Just use it with recent ElasticSearch lib as described as the Readme. But with host change to `host = https://localhost:9200

Expected behavior ElasticSearch should works well with news-please

Versions (please complete the following information):

Intent (optional; we'll use this info to prioritize upcoming tasks to work on)