Last active
November 8, 2024 21:20
-
-
Save jtornero/aae0c0211f9351f09a1a95724d64c7c3 to your computer and use it in GitHub Desktop.
Cutrebot para Bluesky
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import division, print_function | |
import string, time | |
import unidecode | |
import math, random | |
from atproto import Client, client_utils | |
# Tuiteo | |
hashtagsRadioEN=['#hamradio','#CW','#hamr','#AmateurRadio'] | |
hashtagsMorse=['#morsecode','#morse'] | |
hashtagsRadioES=['#RadioEscucha','#Radioafición','#Radioaficionados'] | |
tagRadioEN=random.sample(hashtagsRadioEN,2) | |
tagMorse=random.sample(hashtagsMorse,1) | |
tagRadioES=random.sample(hashtagsRadioES,2) | |
mensaje='El refrán del día a 25 WPM\n%s %s %s %s %s' %(tagRadioEN[0], tagRadioEN[1], tagMorse[0], tagRadioES[0], tagRadioES[1]) | |
client = Client() | |
profile = client.login('nombre_cuenta', 'codigo_acceso') | |
print('Welcome,', profile.display_name) | |
# El video ha sido generado previamente a partir de una base de datos con los refranes y guardado como esp.mp4 | |
with open('esp.mp4',"rb") as fichero: | |
videobytes=fichero.read() | |
post= client.send_video(mensaje,video=videobytes,video_alt=refran) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment