This commit is contained in:
jon ander 2024-11-30 17:27:14 +01:00
parent 69bb8e7d3f
commit 6768381bd0
4 changed files with 22 additions and 4 deletions

View File

@ -16,6 +16,7 @@ def tareaUno():
return
Done = False
hilos = list()
for i in range(50):
t = threading.Thread(target=tareaUno)

View File

@ -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)

View File

View File

@ -1,4 +1 @@
def my_function(*child):
print("The youngest child is " + child[1])
my_function("a","b")
print("Hello World!")