diff --git a/.idea/PrgServicios.iml b/.idea/PrgServicios.iml index 405ee04..d9e6024 100644 --- a/.idea/PrgServicios.iml +++ b/.idea/PrgServicios.iml @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 1f9c218..f8a22e9 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -3,5 +3,5 @@ - + \ No newline at end of file diff --git a/ejercicios/paralelismo02/ej01/__init__.py b/ejercicios/paralelismo02/ej01/__init__.py index 593db34..b5be633 100644 --- a/ejercicios/paralelismo02/ej01/__init__.py +++ b/ejercicios/paralelismo02/ej01/__init__.py @@ -1,6 +1,6 @@ from ejercicios.paralelismo02.ej01.ej01 import MiScraping -hilo = MiScraping("http://localhost/mi_web") +hilo = MiScraping("http://localhost:8000/portada.html") hilo.start() hilo.join() links = hilo.get_links() diff --git a/ejercicios/paralelismo02/ej01/ej01.py b/ejercicios/paralelismo02/ej01/ej01.py index 1d00b46..1b5649e 100644 --- a/ejercicios/paralelismo02/ej01/ej01.py +++ b/ejercicios/paralelismo02/ej01/ej01.py @@ -11,7 +11,7 @@ class MiScraping(threading.Thread): def run(self): response = requests.get(self.url) soup = BeautifulSoup(response.text,"html.parser") - self.links = [a['href'] for a in soup.find_all('a', href=True) if re.match(r'http[s]?://', a['href'])] + self.links = [a['href'] for a in soup.find_all('a', href=True)] def get_links(self): return self.links