Skip to content

new Scraper().getTweets() is not working #203

Description

@MantasVaistaras
import { Scraper } from "@the-convocation/twitter-scraper";

const scraper = new Scraper();
const cookieString = process.env.COOKIE_STRING;

if (cookieString) {
  // Parse the cookie string into trimmed name=value pairs
  const cookies = cookieString
    .split(/;\s*/)
    .map((c) => c.trim())
    .filter(Boolean);

  // The library accepts an array of cookie strings or tough-cookie Cookie objects
  await scraper.setCookies(cookies);
}

const latestTweets = await scraper.getTweets("toly", 10);
console.log(latestTweets);

Expected

10 latest tweets of "toly"

Result

Nothing

Image

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions