Skip to main content

Es una biblioteca que te permite interactuar de manera eficiente con la API de Twitter.

Project description

xtweet

xtweet es una biblioteca que te permite interactuar de manera eficiente con la API de Twitter. Con ella, puedes obtener información detallada sobre tweets y medios de manera rápida y sencilla.

Uso

La clase Tweet representa un tweet de Twitter y proporciona propiedades para acceder a la información del tweet.

from xtweet import Tweet

tweet = Tweet(url)

Propiedades

La clase Tweet proporciona las siguientes propiedades para acceder a la información del tweet:

  • date: Fecha de publicación del tweet.
  • text: Texto del tweet.
  • thumbnail_url: URL de la miniatura de la primera imagen incluida en el tweet, si está disponible.
  • likes: Número de me gusta del tweet.
  • replies: Número de respuestas al tweet.
  • retweets: Número de retweets del tweet.
  • tweet_id: ID del tweet.
  • user_name: Nombre del usuario que publicó el tweet.
  • user_screen_name: Nombre de pantalla del usuario que publicó el tweet.

La clase Media representa los medios incluidos en un tweet y proporciona métodos para descargar imágenes y videos.

from xtweet import Media

media = Media(url)

Métodos

La clase Media proporciona los siguientes métodos para descargar imágenes y videos:

  • download_photo(fp, name_file): Descarga todas las imágenes incluidas en el tweet y las guarda en el directorio especificado por el argumento fp con un nombre de archivo que incluye un índice para distinguir entre las diferentes imágenes. El argumento opcional name_file especifica el nombre base del archivo.

  • download_video(fp, name_file): Descarga todos los videos incluidos en el tweet y los guarda en el directorio especificado por el argumento fp con un nombre de archivo que incluye un índice para distinguir entre los diferentes videos. El argumento opcional name_file especifica el nombre base del archivo.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

xtweet-1.0.2-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file xtweet-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: xtweet-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for xtweet-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ce78f17490d8806e79fb79b2f111e58ed6d35c4f746c0b5b795a003ca03da11c
MD5 edaa5cebcbb9596de99767047576ddc0
BLAKE2b-256 b912dc46deef457a9cb55162e77d45b670219e486ce76694a7af98e69dfb14ac

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