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

TypeError: Cannot read property 'constructor' of null #7

Open
daanjanssen1998 opened this issue Jul 10, 2017 · 1 comment
Open

TypeError: Cannot read property 'constructor' of null #7

daanjanssen1998 opened this issue Jul 10, 2017 · 1 comment

Comments

@daanjanssen1998
Copy link

I have problems scraping this url (https://www.conrad.nl/nl/led-tv-49-inch-samsung-ue49ku6509-zilver-1426083.html).

I got the following error:

/home/daan/microdata/node_modules/MD5/md5.js:9
    if (message.constructor == String)
               ^

TypeError: Cannot read property 'constructor' of null
    at md5 (/home/daan/microdata/node_modules/MD5/md5.js:9:16)
    at module.exports (/home/daan/microdata/node_modules/MD5/md5.js:154:42)
    at processTag (/home/daan/microdata/node_modules/node-microdata-scraper/index.js:44:38)
    at Object.<anonymous> (/home/daan/microdata/node_modules/node-microdata-scraper/index.js:69:7)
    at /home/daan/microdata/node_modules/node-microdata-scraper/node_modules/cheerio/lib/api/traversing.js:232:18
    at /home/daan/microdata/node_modules/underscore/underscore.js:120:25
    at _.each._.forEach (/home/daan/microdata/node_modules/underscore/underscore.js:82:22)
    at Function._.reduce._.foldl._.inject (/home/daan/microdata/node_modules/underscore/underscore.js:115:5)
    at module.exports.exports.map (/home/daan/microdata/node_modules/node-microdata-scraper/node_modules/cheerio/lib/api/traversing.js:231:23)
    at parse (/home/daan/microdata/node_modules/node-microdata-scraper/index.js:61:40)

This is my code:

var url = 'https://www.conrad.nl/nl/led-tv-49-inch-samsung-ue49ku6509-zilver-1426083.html';
microdata.parseUrl(url, function(err, json) {
    if (!err && json) {
        console.log(json);
    }
});

I already have tried it to fix with installing the md5 package from npm with npm install md5.

I am using the following versions:

  • Node v8.1.2
  • node-microdata-scraper 0.0.4
@javidjamae
Copy link

I have the same exact issue when trying to parse this url:
https://www.eventbrite.com/e/startup-weekend-oakland-0917-tickets-37018869435?aff=ehomecard

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