(self, sub_url)
| 21 | self.absolute_path = os.getcwd().strip() + "/" + self.new_folder_name |
| 22 | |
| 23 | def crawl_html_page(self, sub_url): |
| 24 | url = sub_url # Url for html content parsing. |
| 25 | |
| 26 | # Handing the connection error of the url. |
| 27 | try: |
| 28 | page = requests.get(url) |
| 29 | # It parses the html data from requested url. |
| 30 | soup = BeautifulSoup(page.text, "html.parser") |
| 31 | return soup |
| 32 | |
| 33 | except ConnectionError: |
| 34 | print("Please check your network connection and re-run the script.") |
| 35 | exit() |
| 36 | |
| 37 | except Exception: |
| 38 | print("Please check your network connection and re-run the script.") |
| 39 | exit() |
| 40 | |
| 41 | def crawl_phone_urls(self): |
| 42 | phones_urls = [] |
no test coverage detected