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

Call to undefined method DOMDocument::hasAttribute() #84

Open
kolaente opened this issue Dec 25, 2023 · 2 comments
Open

Call to undefined method DOMDocument::hasAttribute() #84

kolaente opened this issue Dec 25, 2023 · 2 comments

Comments

@kolaente
Copy link

kolaente commented Dec 25, 2023

Trying to parse https://www.youngmoney.co/p/defense-fed with Graby's fetchContent results in an exception:

https://flareapp.io/share/yPa9qqKP (You need to expand the vendor frames to see the stack trace)

It looks like the error occures here: https://github.com/j0k3r/php-readability/blob/master/src/Readability.php#L1183

Not sure if this is a problem with the site or Graby or this package.

@j0k3r
Copy link
Owner

j0k3r commented Jan 3, 2024

What version of Graby are you using?
I just tried on the 2.4.4 and I worked well:

<?php

declare(strict_types=1);

require 'vendor/autoload.php';

use Graby\Graby;

$article = 'https://www.youngmoney.co/p/defense-fed';

$graby = new Graby(['debug' => true]);
$result = $graby->fetchContent($article);

var_export($result);

@kolaente
Copy link
Author

kolaente commented Jan 4, 2024

I'm using Graby 4c0b0365ddd3fbe877d05abf985a15dc1bf3ad75 (via dev-master) with j0k3r/graby#286 and j0k3r/graby#332

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

No branches or pull requests

2 participants