Comments (4)
Workarounds are great and all that, but is there any chance to get it fixed in the project itself?
from wombat.
@felipecsl I'm having the same problem here... @derantell did you ever resolved this?
from wombat.
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.
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)
- Is it possible to programmatically create the properties to search for? HOT 2
- Cannot run the example code. HOT 4
- How to get image src link HOT 2
- Support many proxy server
- How to go over multiple subpaths
- local file support HOT 3
- Get url of followed link HOT 3
- Clearing cookies HOT 1
- `set_proxy` not working HOT 1
- Use more strict dependencies
- Dynamically set base_url and path. HOT 2
- How do i access the siblings using css selector in wombat
- customize http header
- page function is not work
- Allow hash selector as last argument to property
- Image provision
- How do I remove a node?
- Documentation links are incorrect
- LoadError in sample code â mechanize.rb: cannot load net/http/digest_auth
- pagination infinite scroll HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ī¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wombat.