Skip to content

Seems like the zombie api changed? #5

@alexanderkjeldaas

Description

@alexanderkjeldaas

According to this:

https://groups.google.com/forum/#!msg/zombie-js/qOS0W_cMCgQ/4iFcqLjVEPgJ

It seems like this code in crawlme.js cannot work because the callback doesn't get browser. Simply removing the browser argument from the callback seems to fix the issue.

browser.visit(url, {waitFor: options.waitFor},
  function(err, browser, status) {
    if(err) return cb(err);

    // links
    var links = browser.queryAll('a'); // browser is undefined
    links.forEach(function(link) {
      var href = link.getAttribute('href');
      var absoluteUrl = urlParser.resolve(url, href);
      link.setAttribute('href', absoluteUrl);
    });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions