Português
Abrir no Telegram

Mensagemimport os

23 de outubro de 2019
П
import os import os.path import wget #from threading import Thread import threading from queues import Queue class Downloader(threading.Thread): def init(self, queue): threading.Thread.init(self) self.queue = queue def run(self): while True: url = self.queue.get() self.download_file(url) self.queue.task_done() def download_file(self, url): file_name = url.split('/')[-1] wget.download(url, os.getcwd()+'/wwwroot/img/'+file_name) def loadImgs(imgs): queue = Queue() for i in range(5): t = Downloader(queue) t.setDaemon(True) t.start() for url in imgs: queue.put(url) queue.join()

Por perto no feed

ППавелможно пример я на c# пишу обычноППавелпробывал
esta mensagem
LLM 🐈‍⬛https://docs.python.org/3.8/library/multiprocessing.html#process-and-exceptionsППавелспасибо буду разбираться
ССообщество Python ПрограммистовСообщество Python Программистов@python_scripts · grupo · Tecnologia
4 169membros43escrevendo em 30 dias
Feed da comunidade Abrir no Telegram

Um feed público aberto do índice de busca ChatCrawler — “o Google do Telegram público”; atualizado à medida que a comunidade é rastreada. Horários em UTC.

Somente conteúdo público, API oficial do Telegram. Sobre · Perguntas frequentes · Limites do índice · Remover uma página · Catálogo · Busca · Como calculamos