Fix page title of some lists
Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
This commit is contained in:
parent
9bc38b7291
commit
25cd2d956d
14
main.py
14
main.py
|
@ -24,6 +24,11 @@ def secondary_list(path):
|
|||
article_type = soup.find(attrs={"class": ["section_title"]})
|
||||
if (article_type.find("svg") != None):
|
||||
article_type.find("svg").decompose()
|
||||
head = article_type.find("span")
|
||||
if head != None:
|
||||
head = head.text
|
||||
else:
|
||||
head = article_type.text
|
||||
article_type_head = soup.find(attrs={"class": ["img_title_wrap"]})
|
||||
description = soup.find(attrs={"class": ["desc_cont_wrap"]}).text
|
||||
|
||||
|
@ -52,7 +57,7 @@ def secondary_list(path):
|
|||
next_button = buttons[1]
|
||||
pagenumber = soup.find(attrs={"class": ["pagenumber"]}).text
|
||||
|
||||
return [article_type, description, article_list, prev_button, next_button, pagenumber, tags, article_type.text]
|
||||
return [article_type, description, article_list, prev_button, next_button, pagenumber, tags, head]
|
||||
|
||||
else:
|
||||
return data.status_code
|
||||
|
@ -75,6 +80,11 @@ def article_list(path):
|
|||
# Header
|
||||
article_type = soup.find(attrs={"class": ["section_title"]})
|
||||
article_type.find("svg").decompose()
|
||||
head = article_type.find("span")
|
||||
if head != None:
|
||||
head = head.text
|
||||
else:
|
||||
head = article_type.text
|
||||
article_type_head = soup.find(attrs={"class": ["img_title_wrap"]})
|
||||
description = soup.find(attrs={"class": ["page_desc_wrapper"]}).text
|
||||
|
||||
|
@ -99,7 +109,7 @@ def article_list(path):
|
|||
next_button = buttons[1]
|
||||
pagenumber = soup.find(attrs={"class": ["pagenumber"]}).text
|
||||
|
||||
return [article_type, description, article_list, prev_button, next_button, pagenumber, tags, article_type.text]
|
||||
return [article_type, description, article_list, prev_button, next_button, pagenumber, tags, head]
|
||||
|
||||
else:
|
||||
return data.status_code
|
||||
|
|
Loading…
Reference in New Issue