X Scraper by Lab3 icon

X Scraper by Lab3

Scrape X Data with Lab3

Overview

This node, named "X Scraper by Lab3," allows users to interact with the social media platform X (formerly Twitter) by scraping and performing actions on tweets and users. Specifically for the Tweet - Like operation, it enables liking a specified tweet programmatically.

Common scenarios where this node is beneficial include:

  • Automating engagement with tweets as part of social media management workflows.
  • Liking tweets based on certain triggers or conditions in an automated pipeline.
  • Integrating tweet interactions into broader automation processes without manual intervention.

For example, you could set up a workflow that listens for new tweets matching a keyword and automatically likes them using this node.

Properties

Name Meaning
Tweet The tweet to like. Can be specified either by its unique ID or by the full URL of the tweet.

The "Tweet" property supports two modes for identifying the tweet:

  • By ID: Provide the tweet's unique identifier (e.g., 1187836157394112513).
  • By URL: Provide the full URL of the tweet (e.g., https://x.com/n8n_io/status/1187836157394112513).

Output

The output JSON contains a confirmation message indicating the success of the like action. For example:

{
  "json": "Tweet has been successfully liked"
}

No binary data is output by this operation.

Dependencies

  • Requires an API key credential with appropriate authentication tokens and cookies for accessing X's services.
  • The node depends on a scraper library internally (referred to as Eliza) which handles the interaction with X.
  • The following credentials must be provided and valid: guest ID, kdt, twid, ct0, and auth token.
  • No additional external services are explicitly required beyond the authenticated access to X.

Troubleshooting

  • Missing Credentials Error: If any required authentication tokens or cookies are missing, the node will throw an error listing which credentials are absent. Ensure all required tokens are correctly configured in the node credentials.
  • Failed to Initialize Scraper: This error indicates issues during setup of the internal scraper client, possibly due to invalid or expired credentials.
  • Invalid Tweet ID or URL: Providing an incorrect or malformed tweet identifier may cause the like operation to fail. Verify the tweet exists and the ID/URL is correct.
  • Rate Limits or Access Restrictions: Since this node scrapes data and performs actions on X, it may be subject to rate limits or restrictions imposed by the platform. Handle errors gracefully and consider adding retry logic if needed.
  • Continue On Fail: If enabled, the node will continue processing other items even if one fails, returning the error message in the output JSON.

Links and References

Discussion