From 6768381bd06e0c21bfbd657e910a8c3729e4ebbf Mon Sep 17 00:00:00 2001 From: jon ander Date: Sat, 30 Nov 2024 17:27:14 +0100 Subject: [PATCH] wip --- ejemplos/paralelismo01/ej04.py | 1 + ejercicios/paralelismo02/ej01.py | 20 ++++++++++++++++++++ ejercicios/paralelistmo01/Mod01.py | 0 pruebas/__init__.py | 5 +---- 4 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 ejercicios/paralelismo02/ej01.py create mode 100644 ejercicios/paralelistmo01/Mod01.py diff --git a/ejemplos/paralelismo01/ej04.py b/ejemplos/paralelismo01/ej04.py index 8d80b63..b0519bd 100644 --- a/ejemplos/paralelismo01/ej04.py +++ b/ejemplos/paralelismo01/ej04.py @@ -16,6 +16,7 @@ def tareaUno(): return Done = False + hilos = list() for i in range(50): t = threading.Thread(target=tareaUno) diff --git a/ejercicios/paralelismo02/ej01.py b/ejercicios/paralelismo02/ej01.py new file mode 100644 index 0000000..db9d979 --- /dev/null +++ b/ejercicios/paralelismo02/ej01.py @@ -0,0 +1,20 @@ +import threading +import requests +from bs4 import BeautifulSoup +import re + +class MiScraping(threading.Thread): + + def __init__(self,url): + threading.Thread.__init__(self) + self.url = url + self.links =[] + def run(self): + # self.url coge el "url" que se le pase al constructor a la hora de llamar al metodo + response = requests.get(self.url) + + + + + + diff --git a/ejercicios/paralelistmo01/Mod01.py b/ejercicios/paralelistmo01/Mod01.py new file mode 100644 index 0000000..e69de29 diff --git a/pruebas/__init__.py b/pruebas/__init__.py index 920f2da..1dc45ac 100644 --- a/pruebas/__init__.py +++ b/pruebas/__init__.py @@ -1,4 +1 @@ -def my_function(*child): - print("The youngest child is " + child[1]) - -my_function("a","b") \ No newline at end of file +print("Hello World!") \ No newline at end of file