GithubHelp home page GithubHelp logo

Comments (4)

smileart avatar smileart commented on May 5, 2024 1

Workarounds are great and all that, but is there any chance to get it fixed in the project itself? ☚ī¸

from wombat.

acidghost avatar acidghost commented on May 5, 2024

@felipecsl I'm having the same problem here... @derantell did you ever resolved this?

from wombat.

shashwatsingh avatar shashwatsingh commented on May 5, 2024

Same issue and gem versions same as derantell listed but on Linux 3.16 x86_64 instead.

Did anyone else have this issue? I tried following - which works, but if someone has a better way, that would be great:

module Wombat
  module DSL
    class Metadata
      alias_method :mech_page_ref, :page
    end
  end
end

and then used it as follows:

data = Wombat.crawl do
  mech_page_ref mech
end

from wombat.

cyu avatar cyu commented on May 5, 2024

I just ran into this issue as well. The issue is that Wombat::Processing::Parser defines a page accessor (https://github.com/felipecsl/wombat/blob/master/lib/wombat/processing/parser.rb#L24). Here's my workaround to the issue:

# cannot use Wombat#crawl
class Crawler
  include Wombat::Crawler
  og_image xpath: '//html/head/meta[@property = "og:image"]/@content'
  twitter_image_src xpath: '//html/head/meta[@name = "twitter:image:src"]/@content'
end

crawler = Crawler.new
page = crawler.mechanize.get(uri.to_s)
crawler.metadata[:page] = page
result = crawler.crawl

from wombat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤ī¸ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.