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

console.log client.image() is undefiend and client.images() crashes server #6

Open
sferoze opened this issue Jul 14, 2014 · 1 comment

Comments

@sferoze
Copy link

sferoze commented Jul 14, 2014

I am trying to log out the images on a webpage and it does not work.

I have tried.

console.log 'client image ' + client.images()  // Crashes server

console.log 'client image ' + client.image() // undefined

Here is the code I am using:

client = new MetaInspector('http://cnn.com', {})

client.on 'fetch', ->
  console.log 'client image ' + client.images
  console.log 'client links ' + client.links().join(",")

client.fetch()

console.logging out client.description() & client.links() seems to work fine.

@sferoze sferoze changed the title Logging out client.image() is undefiend and client.images() crashes server console.log client.image() is undefiend and client.images() crashes server Jul 14, 2014
@gabceb
Copy link
Owner

gabceb commented Jul 14, 2014

The image() is undefined because cnn.com does not provide an meta[property='og:image'] property.

line 4 on seconds block should be client.images() because it is a function. I will update the README file. If everything works as expected close this issue.

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