Skip to main content

Get tweet content using selenium

Project description

PyTweet - Selenium

PyTweet Selenium is a simple Python package to extract tweet content from a given URL. Built on selenium.


Installation

To install PyTweet, use:

pip install pytweetselenium

Usage

Here's how you can use PyTweet to fetch tweet content:

import pytweetselenium

url = "https://x.com/AlexanderJiazx/status/1876874066319049004"
result = pytweetselenium.get(url)
print(result)

Output Example

The pytweetselenium.get() function returns a dictionary containing key information about the tweet:

{
    'author': 'Alexander Jia',
    'author_id': 'AlexanderJiazx',
    'text': 'Got the access of AVM with vision!\nTell me how do you want to test it.',
    'replies': '7',
    'retweets': '3',
    'likes': '57',
    'bookmarks': '8',
    'timestamp': '2024-12-12T23:26:11.000Z'
}

Functions

  • Extracts tweet content, including author details, tweet text, engagement metrics (replies, retweets, likes, bookmarks), and timestamp.
  • Extraction support text only, image support coming soon.

License

This project is licensed under the MIT License. See the LICENSE file for details.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytweet_selenium-1.0.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytweet_selenium-1.0.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file pytweet_selenium-1.0.0.tar.gz.

File metadata

  • Download URL: pytweet_selenium-1.0.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.3

File hashes

Hashes for pytweet_selenium-1.0.0.tar.gz
Algorithm Hash digest
SHA256 de86462680360bb0359df2b2ef8d578fe0552083205f8039ccf607550f34171c
MD5 c26b18ac822c3585bb8349229a4f1ecb
BLAKE2b-256 45f7054cd4f13d4a6c57812e843514f60521a7e7291e6bdf3b439f9447dc3203

See more details on using hashes here.

File details

Details for the file pytweet_selenium-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pytweet_selenium-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dea8b59ab3ba4ad99e265ace8c4158db05fa450d89d6e515ce555e37cbec2ed0
MD5 a4d3795debe0d83b83c2e9a818441c6d
BLAKE2b-256 4f0dcc712b844b284c9913d0a459a8c2891bb20163f640e772cd146acc79c9c2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page