|
|
@ -48,8 +48,12 @@ def procrax_description_parser(soup: Tag): |
|
|
|
user_status = ipost.find("h5", {"class": "userTitle message-userTitle"}).text |
|
|
|
status.append(cleanString(user_status.strip())) |
|
|
|
|
|
|
|
user_lvl = ipost.find("div", {"class": "afAwardLevel"}).text |
|
|
|
reputation.append(cleanString(user_lvl.strip())) |
|
|
|
user_lvl = ipost.find("div", {"class": "afAwardLevel"}) |
|
|
|
if user_lvl is not None: |
|
|
|
user_lvl = user_lvl.text |
|
|
|
reputation.append(cleanString(user_lvl.strip())) |
|
|
|
else: |
|
|
|
reputation.append('-1') |
|
|
|
|
|
|
|
sign.append("-1") |
|
|
|
|
|
|
@ -110,7 +114,11 @@ def procrax_listing_parser(soup: Tag): |
|
|
|
li = soup.find("h1", {"class": "p-title-value"}) |
|
|
|
board = cleanString(li.text.strip()) |
|
|
|
|
|
|
|
threads_list: ResultSet[Tag] = soup.find("div", {"class": "structItemContainer-group js-threadList"}).find_all("div", {"data-author": True}) |
|
|
|
threads_list = soup.find("div", {"class": "structItemContainer-group js-threadList"}).find_all("div", {"data-author": True}) |
|
|
|
|
|
|
|
sticky = soup.find("div", {"class": "structItemContainer-group structItemContainer-group--sticky"}) |
|
|
|
if sticky is not None: |
|
|
|
threads_list = sticky.find_all("div", {"data-author": True}) + threads_list |
|
|
|
|
|
|
|
nm = len(threads_list) |
|
|
|
|
|
|
@ -134,19 +142,20 @@ def procrax_listing_parser(soup: Tag): |
|
|
|
author.append(cleanString(thread_author)) |
|
|
|
|
|
|
|
thread_views = thread.find("dl", {"class": "pairs pairs--justified structItem-minor"}).find('dd').text |
|
|
|
thread_views = thread_views.lower().replace("k","000") |
|
|
|
views.append(cleanString(thread_views.strip())) |
|
|
|
thread_views = thread_views.lower().replace("k", "000") |
|
|
|
thread_views = thread_views.lower().replace("m", "000000") |
|
|
|
views.append(thread_views.strip()) |
|
|
|
|
|
|
|
thread_replies = thread.find("dl", {"class": "pairs pairs--justified"}).find('dd').text |
|
|
|
# All threads contain one topic post and reply posts |
|
|
|
thread_total_posts = str(1 + int(thread_replies)) |
|
|
|
posts.append(thread_total_posts) |
|
|
|
thread_total_posts = thread_replies.lower().replace("k", "000") |
|
|
|
posts.append(thread_total_posts.strip()) |
|
|
|
|
|
|
|
thread_date = thread.find("li", {"class": "structItem-startDate"}).find("time").get("datetime") |
|
|
|
datetime_obj = datetime.strptime(thread_date, "%Y-%m-%dT%H:%M:%S%z") |
|
|
|
addDate.append(datetime_obj) |
|
|
|
|
|
|
|
thread_link: str = thread.find("div", {"class": "structItem-title"}).find('a').get('href') |
|
|
|
thread_link: str = thread.find("div", {"class": "structItem-title"}).find('a', {'class': ''}).get('href') |
|
|
|
href.append(thread_link) |
|
|
|
|
|
|
|
|
|
|
|