Skip to content
This repository has been archived by the owner on May 14, 2023. It is now read-only.

NoMethodError on Diffbot::Article #11

Closed
ProgrammingSam opened this issue May 12, 2019 · 2 comments
Closed

NoMethodError on Diffbot::Article #11

ProgrammingSam opened this issue May 12, 2019 · 2 comments

Comments

@ProgrammingSam
Copy link

Hi,

I'm currently trying to make your gem working.

By following your documentation, I do :

require 'diffbot'

Diffbot::Article.fetch(url, ENV['DIFFBOT_API']) do |request|
  request.html = true # Return HTML instead of plain text.
  request.summary = true # Return a summary text instead of the full text.
end

That returns :

NoMethodError:
  The property 'nextPage' is not defined for Diffbot::Article.

Maybe the Diffbot API changed since issue #1 and its fix ?

Regards

@greshny
Copy link
Collaborator

greshny commented May 12, 2019

hi @ProgrammingSam
can you please send me any example URL to reproduce it?

Regards,
Roman

@ProgrammingSam
Copy link
Author

ProgrammingSam commented May 12, 2019

Thank you for your quick answer !

But I found the problem myself...

In fact I'm crawling multiple urls by categories and it fails on some index pages like https://www.space.com/science-astronomy which I should avoid since they are not articles.

I think that Diffbot::Article.property :next_page, from: :nextPage should be kept "just in case", I will try to find an example.

Regards,

Sami

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants