Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add robustness for pages missing title #274

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

yldoctrine
Copy link
Contributor

Hello @fhamborg
This pull request aims to add a bit of robustness, when a website doesn't use a title on some pages

    File "/usr/local/lib/python3.10/site-packages/newsplease/helper_classes/parse_crawler.py", line 43, in pass_to_pipeline_if_article
     return self.pass_to_pipeline(
   File "/usr/local/lib/python3.10/site-packages/newsplease/helper_classes/parse_crawler.py", line 70, in pass_to_pipeline
     .extract_first().encode("utf-8")
 AttributeError: 'NoneType' object has no attribute 'encode'

@yldoctrine yldoctrine changed the title Some website have no title, deal with them Add robustness for pages missing title Jul 3, 2024
@fhamborg fhamborg merged commit 3896c7d into fhamborg:master Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants