Если запустить REPL с модулем asyncio, то вы входите в особый асинхронный REPL.
user@host:~$ python -m asyncio
asyncio REPL 3.12.7 ...
Use "await" directly instead of "asyncio.run()".
>>> import asyncio
>>>
В этом режиме
- создаётся и настраивается event loop
- уже импортирован asyncio
- работает await на верхнем уровне
То есть такая команда сработает без ошибок!
await asyncio.sleep(3)
Удобно для тестирования асинхронных функций без создания ивентлупов и остальной обвязки.
Работает в: 3.8+
#tricks#async
@SubtitleEricBot
Qué puede hacer este bot?
Envie el nombre de la película. Utilice @imdb inline para obtener el nombre correcto de la película.
- Buscaré ese subtítulo.
- A continuación, seleccione el idioma
- Entonces el bot te enviará ese archivo de subtítulos.
Idioma: Inglés
(visto en @BotsGram_cu)
#download, #subtitle
@SubtitleDLbot
Qué puede hacer este bot?
Este bot encuentra y descarga subtítulos
Idioma: Inglés
(visto en @BotsGram_cu)
#subtitle, #subs, #movie, #film, #cinema
#python#asr#captions#cli#python#subtitle#subtitles#transcript#transcripts#translating_transcripts#youtube#youtube_api#youtube_asr#youtube_captions#youtube_subtitles#youtube_transcript#youtube_transcripts#youtube_video
The YouTube Transcript API is a tool that helps you get the text from YouTube videos. It's fast and easy to use, saving you time compared to watching the whole video. You can use it to make subtitles, translate text, and even analyze what's being said in videos. This is helpful for content creators who want to make their videos more accessible and for researchers who need to study video content quickly. It also supports multiple languages, making it useful for a wide range of users.
https://github.com/jdepoix/youtube-transcript-api