Comments (15)
Have you tried it with latest stable?
from node-scraper.
Yeah, fails on node 0.4.2 with jsdom 0.2.0... works fine with jsdom 0.1.23.
from node-scraper.
Is that when using the examples or scraping a different site?
from node-scraper.
Just the first simple twitter example in your README.
from node-scraper.
Seems like it's probably a JSDOM issue.
from node-scraper.
I don't have that issue though, but yeah, seems jsdom doesn't want to play.
from node-scraper.
Had the same issue. fixed with change to scraper.js
replaced __dirname+'/../deps/jquery-1.3.2.js'
with 'http://code.jquery.com/jquery-1.4.2.min.js'
seems to be an issue loading the file in jsdom.jQuerify call - path is correct and permissions are fine so not sure what the problem is.
from node-scraper.
This issue isn't solved. I had the same problem with jsdom 0.2.0
, and I solved it with @jma3s suggestion.
$ node --version
v0.4.7
I actually upgrade though to jquery-1.6.0
from node-scraper.
Tried @jma3s fix, but still get that error.
TypeError: Cannot read property 'prototype' of undefined
at /Users/mofle/node_modules/scraper/node_modules/jsdom/lib/jsdom/browser/index.js:84:16
at String.<anonymous> ([object Context]:2500:12)
at Function.each ([object Context]:692:29)
at Object.add ([object Context]:2478:10)
at [object Context]:2907:17
at Function.each ([object Context]:692:29)
at Object.each ([object Context]:155:17)
at Object.one ([object Context]:2906:15)
at Object.bind ([object Context]:2896:34)
at [object Context]:3106:18
at [object Context]:4376:2
at Object.javascript (/Users/mofle/node_modules/scraper/node_modules/jsdom/lib/jsdom/level2/languages/javascript.js:17:14)
at Object._eval (/Users/mofle/node_modules/scraper/node_modules/jsdom/lib/jsdom/level2/html.js:1195:46)
at /Users/mofle/node_modules/scraper/node_modules/jsdom/lib/jsdom/level2/html.js:43:20
at Object.check (/Users/mofle/node_modules/scraper/node_modules/jsdom/lib/jsdom/level2/html.js:235:11)
at /Users/mofle/node_modules/scraper/node_modules/jsdom/lib/jsdom/level2/html.js:251:12
at [object Object].<anonymous> (fs.js:107:5)
at [object Object].emit (events.js:61:17)
at afterRead (fs.js:878:12)
at wrapper (fs.js:245:17)
TypeError: undefined is not a function
at CALL_NON_FUNCTION (native)
at /Users/mofle/node_modules/scraper/lib/scraper.js:58:7
at /Users/mofle/node_modules/scraper/node_modules/jsdom/lib/jsdom.js:151:7
at Object.<anonymous> (/Users/mofle/node_modules/scraper/node_modules/jsdom/lib/jsdom/level2/events.js:274:17)
at Object.dispatchEvent (/Users/mofle/node_modules/scraper/node_modules/jsdom/lib/jsdom/level2/html.js:415:55)
at /Users/mofle/node_modules/scraper/node_modules/jsdom/lib/jsdom/level2/html.js:56:15
at Object.check (/Users/mofle/node_modules/scraper/node_modules/jsdom/lib/jsdom/level2/html.js:235:11)
at /Users/mofle/node_modules/scraper/node_modules/jsdom/lib/jsdom/level2/html.js:251:12
at [object Object].<anonymous> (fs.js:107:5)
at [object Object].emit (events.js:61:17)
from node-scraper.
Mine was fixed by updating jQuery ala @jma3s. I used 1.6.1.
from node-scraper.
@mape could we get this patched with @jma3s's suggestion and the latest version of jQuery?
from node-scraper.
The scraper is now updated to use jQuery 1.6.1 and is pushed to npm.
@mofle Do you get that error with all pages? And are you using latest jsdom?
from node-scraper.
There is also an issue with jsdom 0.2.0 which has been fixed in 0.2.1 though it has not been yet pushed to npm. Also line 57 of scrape.js is still referring to jQuery 1.3.2.
After switching it to the supplied 1.6.1 library and changing the require statement to point to [email protected], scraper is working as expected.
p.s.: I'm currently using node v0.5.0-pre.
from node-scraper.
Silly me, pushed update that uses jQuery 1.61.
from node-scraper.
I did a manual uninstall of jsdom via npm: npm uninstall jsdom from within the scraper directory project/node_modules/scraper
and then ran this:
npm install https://github.com/tmpvar/jsdom/tarball/4cf155a1624b3fb54b2eec536a0c060ec1bab4ab
out at the upper level project/ - it seems to have fixed it also. (it has the jsdom 0.2.1 fix)
from node-scraper.
Related Issues (20)
- Getting css background-image HOT 1
- Incatchable errors HOT 1
- How to add a url to scrap? HOT 3
- How do I know the parsed url?
- README.md has bad link to request
- FATAL ERROR: CALL_AND_RETRY_2 Allocation failed - process out of memory HOT 2
- Array access doesn't seem to work?
- A way to know when all scraper requests have completed for the entire process? HOT 1
- Text not scraped, but on the demo site it works!
- how to get http code
- trying to fetch ñ.ñ
- jsdom.jQueryify() not passing correct directory syntax on Windows node environments
- Undefined function error in Node.js v0.12
- Error when running demo code provided HOT 21
- How Do You Use This? HOT 1
- Charset ?? HOT 1
- Parallel scraping results in misses & duplicates HOT 4
- Final Callback HOT 1
- Remote error: TypeError: Cannot read property '_ownerDocument' of undefined 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 node-scraper.