drobnikj / seo-audit-tool

SEO audit tool build on top of Apify SDK
https://apify.com/drobnikj/seo-audit-tool
23 stars 16 forks source link

Issue when trying to run locally #18

Closed okabak123 closed 2 years ago

okabak123 commented 2 years ago

I've been trying to run this locally like the google maps scraper however I came across this problem while trying to do it: `PS F:\Scraping\seo-audit-tool-master> apify run --purge Info: All default local stores were purged. Warning: You are not logged in with your Apify Account. Some features like Apify Proxy will not work. Call "apify login" to fix that. Run: npm.cmd start

seo-audit-tool@2.0.0 start node ./src/main.js

INFO System info {"apifyVersion":"2.0.6","apifyClientVersion":"1.4.2","osType":"Windows_NT","nodeVersion":"v16.9.0"} INFO SEO audit for https://apify.com started INFO Web host name: apify.com ERROR ArgumentError: Did not expect property launchPuppeteerOptions to exist, got [object Object] in object PuppeteerCrawlerOptions at Object.ow [as default] (F:\Scraping\node_modules\ow\dist\index.js:32:19) at new PuppeteerCrawler (F:\Scraping\node_modules\apify\build\crawlers\puppeteer_crawler.js:241:21) at F:\Scraping\seo-audit-tool-master\src\main.js:39:21 at async run (F:\Scraping\node_modules\apify\build\actor.js:182:13) Error: npm.cmd exited with code 91`

This is what my INPUT.json looks like:

{
    "startUrl": "https://apify.com",
    "proxy": {
      "useApifyProxy": false
    },
    "maxRequestsPerCrawl": 100,
    "maxDepth": 2,
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36",
    "viewPortWidth": 1440,
    "viewPortHeight": 900,
    "pageTimeout": 30000,
    "maxRequestRetries": 2,
    "handlePageTimeoutSecs": 2,
    "seoParams": {
      "maxTitleLength": 70,
      "minTitleLength": 10,
      "maxMetaDescriptionLength": 140,
      "maxLinksCount": 3000,
      "maxWordsCount": 350,
      "outputLinks": false,
      "workingStatusCodes": [
        200,
        301,
        302,
        304
      ]
    }
  }

Any ideas?

pocesar commented 2 years ago

looks like you're installing the wrong version of Apify SDK, this scraper uses 0.21, and you're trying to run it on 2.0.6. use npm install to run, instead of npm i apify