|
@ -22,6 +22,7 @@ def HiddenAnswers_description_parser(soup: BeautifulSoup): |
|
|
sign: List[str] = [] # all user's signature in each post (usually a standard message after the content of the post) |
|
|
sign: List[str] = [] # all user's signature in each post (usually a standard message after the content of the post) |
|
|
post: List[str] = [] # all messages of each post |
|
|
post: List[str] = [] # all messages of each post |
|
|
interest: List[str] = [] # all user's interest in each post |
|
|
interest: List[str] = [] # all user's interest in each post |
|
|
|
|
|
image = [] |
|
|
image_user = [] |
|
|
image_user = [] |
|
|
|
|
|
|
|
|
# Finding the topic (should be just one coming from the Listing Page) |
|
|
# Finding the topic (should be just one coming from the Listing Page) |
|
@ -54,6 +55,13 @@ def HiddenAnswers_description_parser(soup: BeautifulSoup): |
|
|
sign.append("-1") |
|
|
sign.append("-1") |
|
|
interest.append("-1") |
|
|
interest.append("-1") |
|
|
|
|
|
|
|
|
|
|
|
img = question.find('div', {"class": "qa-q-view-content qa-post-content"}).find('img') |
|
|
|
|
|
if img is not None: |
|
|
|
|
|
img = img.get('src').split('base64,')[-1] |
|
|
|
|
|
else: |
|
|
|
|
|
img = "-1" |
|
|
|
|
|
image.append(img) |
|
|
|
|
|
|
|
|
img = question.find('span', {"class": "qa-q-view-avatar-meta"}).find('img') |
|
|
img = question.find('span', {"class": "qa-q-view-avatar-meta"}).find('img') |
|
|
if img is not None: |
|
|
if img is not None: |
|
|
img = img.get('src').split('base64,')[-1] |
|
|
img = img.get('src').split('base64,')[-1] |
|
@ -90,6 +98,13 @@ def HiddenAnswers_description_parser(soup: BeautifulSoup): |
|
|
sign.append("-1") |
|
|
sign.append("-1") |
|
|
interest.append("-1") |
|
|
interest.append("-1") |
|
|
|
|
|
|
|
|
|
|
|
img = replies.find("div", {"class": "qa-a-item-content qa-post-content"}).find("div",{"itemprop":"text"}).find('img') |
|
|
|
|
|
if img is not None: |
|
|
|
|
|
img = img.get('src').split('base64,')[-1] |
|
|
|
|
|
else: |
|
|
|
|
|
img = "-1" |
|
|
|
|
|
image.append(img) |
|
|
|
|
|
|
|
|
img = replies.find('span', {"class": "qa-a-item-avatar-meta"}).find('img') |
|
|
img = replies.find('span', {"class": "qa-a-item-avatar-meta"}).find('img') |
|
|
if img is not None: |
|
|
if img is not None: |
|
|
img = img.get('src').split('base64,')[-1] |
|
|
img = img.get('src').split('base64,')[-1] |
|
|