wip
This commit is contained in:
		
							parent
							
								
									69bb8e7d3f
								
							
						
					
					
						commit
						6768381bd0
					
				|  | @ -16,6 +16,7 @@ def tareaUno(): | |||
|   return | ||||
| 
 | ||||
| Done = False | ||||
| 
 | ||||
| hilos = list() | ||||
| for i in range(50): | ||||
|   t = threading.Thread(target=tareaUno) | ||||
|  |  | |||
|  | @ -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) | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  | @ -1,4 +1 @@ | |||
| def my_function(*child): | ||||
|   print("The youngest child is " + child[1]) | ||||
| 
 | ||||
| my_function("a","b") | ||||
| print("Hello World!") | ||||
		Loading…
	
		Reference in New Issue