add dots
This commit is contained in:
parent
05f11f06d9
commit
049b78a8f0
1 changed files with 4 additions and 4 deletions
8
main.py
8
main.py
|
@ -51,7 +51,7 @@ class Scraper:
|
|||
return topics, self.getInfos(session, topics)
|
||||
|
||||
def parse(self, htmlPage: str) -> list[dict]:
|
||||
"""Parse HTML reponse to a clean list"""
|
||||
"""Parse HTML reponse to a clean list."""
|
||||
if "No suitable matches were found." in htmlPage:
|
||||
return []
|
||||
elements = htmlPage.split("<tr>\n<td>")[1:]
|
||||
|
@ -81,7 +81,7 @@ class Scraper:
|
|||
return elements
|
||||
|
||||
def getInfos(self, session: CloudScraper, elements: list) -> list:
|
||||
"""Go to the first n pages and get a lot of infos"""
|
||||
"""Go to the first n pages and get a lot of infos."""
|
||||
size = len(elements)
|
||||
if size == 0:
|
||||
return []
|
||||
|
@ -103,7 +103,7 @@ class Scraper:
|
|||
return results
|
||||
|
||||
def parsingInfos(self, elements: list) -> list[dict]:
|
||||
"""Parse infos from the page of the app"""
|
||||
"""Parse infos from the page of the app."""
|
||||
for i in range(0, len(elements)):
|
||||
elements[i] = elements[i].text
|
||||
if "Download Instructions" not in elements[i]:
|
||||
|
@ -131,7 +131,7 @@ class Scraper:
|
|||
return elements
|
||||
|
||||
def prettyPrint(self, topics: tuple[list[dict], list[dict]]) -> list:
|
||||
"""Show a pretty message with all the specialized infos"""
|
||||
"""Show a pretty message with all the specialized infos."""
|
||||
topics, topicsInfos = topics
|
||||
if len(topics) == 0:
|
||||
return []
|
||||
|
|
Reference in a new issue