Skip to content

queue is full, can't add url (was fixed in 0.7.2) #88

Description

@dynabler

In issue #42 there was a limit on url queue of 1024, which was fixed for Flyscrape v0.7.2 to 1M. But somehow v0.9.0 has the same issue. I checked the code, but it's the same code as v0.7.2.

I'm not entirely sure, but could it be config depth, that it somehow leaks? spills over and goes rouge on other links? That way, you can most definitly get over 1M urls. My script had depth: 0, when this happenend and url text file has 4501 urls.

I also noticed my mistake, of adding concurrence to the script and the command-line. Could that be the problem? I just add it all as it happend, so you don't chase ghosts.

import urls from "./urls.txt"

export const config = {
  urls: urls.split("\n"),
  headers: {
    "User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36",
    "Cookie": 'cookie-settings={"all":0,"functional":0,"essentials":1,"analytical":0}'
  },
  depth: 0,
  concurrency: 1
};

export default function({ doc, absoluteURL, url, timestamp }) {
  const id = url
  const followers = doc.find('.header__follow-count').get(0);
  const fans = doc.find('.header__follow-count').get(1);
  const vids = doc.find('._title:contains("Videos")')
  const year = String(new Date().getFullYear());
  const title = doc.find('.header__title-text')

  return { 
    id: url.replace(/.+\/(.+)/,'$1'),
    stats: {
      followers: followers.text().trim(),
      fans: fans.text().trim()
    }
  }
}

and the command used:

    flyscrape run stats.js \
      --output.file "pages/stats_raw.json" \
      --output.format json \
      --rate 6 \
      --concurrency 1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions