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 argumentofpcon un nombre de archivo que incluye un índice para distinguir entre las diferentes imágenes. El argumento opcionalname_fileespecifica 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 argumentofpcon un nombre de archivo que incluye un índice para distinguir entre los diferentes videos. El argumento opcionalname_fileespecifica el nombre base del archivo.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce78f17490d8806e79fb79b2f111e58ed6d35c4f746c0b5b795a003ca03da11c
|
|
| MD5 |
edaa5cebcbb9596de99767047576ddc0
|
|
| BLAKE2b-256 |
b912dc46deef457a9cb55162e77d45b670219e486ce76694a7af98e69dfb14ac
|