Haradai / newspaper3k-haystack

An integration of the nespaper3k library in haystack.
MIT License
4 stars 2 forks source link

Put the title in the metadata #3

Closed recrudesce closed 4 months ago

recrudesce commented 11 months ago

Currently the title of the article isn't added to the metadata.

        if metadata:
            document_dict["meta"]["authors"] = article.authors
            document_dict["meta"]["publish_date"] = article.publish_date
            document_dict["meta"]["movies_url"] = article.movies
            document_dict["meta"]["top_image_url"] = article.top_image

This needs to be modified to include the title

        if metadata:
            document_dict["meta"]["title"] = article.title
            document_dict["meta"]["authors"] = article.authors
            document_dict["meta"]["publish_date"] = article.publish_date
            document_dict["meta"]["movies_url"] = article.movies
            document_dict["meta"]["top_image_url"] = article.top_image