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

Avoid bad date to be send #192

Merged
merged 4 commits into from
Jan 21, 2019
Merged

Avoid bad date to be send #192

merged 4 commits into from
Jan 21, 2019

Conversation

j0k3r
Copy link
Owner

@j0k3r j0k3r commented Jan 21, 2019

If the date can't be parsed, it means it's a bad one and shouldn't be return.

For example https://www.helpnetsecurity.com/2015/07/22/its-official-the-average-ddos-attack-size-is-increasing/ has:

<meta property="article:published_time" content="-0001-11-30T00:00:00+00:00" />

If the date can't be parsed, it means it's a bad one and shouldn't be return.
Copy link
Collaborator

@tcitworld tcitworld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there anything else than ISO 8601 format for dates anyway?

src/Extractor/ContentExtractor.php Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Jan 21, 2019

Coverage Status

Coverage decreased (-0.2%) to 97.75% when pulling e9c27ad on fix/bad-date into fad09dd on master.

@j0k3r
Copy link
Owner Author

j0k3r commented Jan 21, 2019

@tcitworld the xpath can return whatever we want. But I think graby shouldn't return a date that can't be parsed as a date

@j0k3r j0k3r merged commit 802d22d into master Jan 21, 2019
@j0k3r j0k3r deleted the fix/bad-date branch January 21, 2019 15:36
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.

3 participants