Español
Abrir en Telegram

Mensajeimport os

23 de octubre 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()

Cerca en el feed

ППавелможно пример я на c# пишу обычноППавелпробывал
este mensaje
LLM 🐈‍⬛https://docs.python.org/3.8/library/multiprocessing.html#process-and-exceptionsППавелспасибо буду разбираться
ССообщество Python ПрограммистовСообщество Python Программистов@python_scripts · grupo · Tecnología
4 169miembros43escriben en 30 días
Feed de la comunidad Abrir en Telegram

Un feed público abierto del índice de búsqueda ChatCrawler — el “Google del Telegram público”; se actualiza a medida que se rastrea la comunidad. Las horas se muestran en UTC.

Solo contenido público, API oficial de Telegram. Acerca de · Preguntas frecuentes · Límites del índice · Eliminar una página · Catálogo · Búsqueda · Cómo contamos