From 033764cf714b0f71c114172e7731976e60015802 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 Aug 2023 15:08:59 -0700 Subject: [PATCH] AnonMarket crawler and parser completed --- MarketPlaces/AnonMarket/crawler_selenium.py | 1 - MarketPlaces/AnonMarket/parser.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/MarketPlaces/AnonMarket/crawler_selenium.py b/MarketPlaces/AnonMarket/crawler_selenium.py index 410cbdc..2171d84 100644 --- a/MarketPlaces/AnonMarket/crawler_selenium.py +++ b/MarketPlaces/AnonMarket/crawler_selenium.py @@ -258,7 +258,6 @@ def crawlForum(driver): print("Crawling Anon Market done.") - # Returns 'True' if the link is a description link #@param: url of any url crawled #return: true if is a description page, false if not diff --git a/MarketPlaces/AnonMarket/parser.py b/MarketPlaces/AnonMarket/parser.py index a488962..c53283c 100644 --- a/MarketPlaces/AnonMarket/parser.py +++ b/MarketPlaces/AnonMarket/parser.py @@ -192,7 +192,7 @@ def AnonMarket_links_parser(soup): href = [] # Using a shorter, but still unique, class name - listing = soup.find_all('a', href=True, attrs={'href': lambda x: "/product/" in x}) + listing = soup.find('div', {'class': 'items'}).find_all('a', href=True, attrs={'href': lambda x: "/product/" in x}) for a in listing: link = a.get('href')