From 4f6126aedb001ce2514f2a20a94cc1be84701739 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 23 Aug 2023 15:08:23 -0700 Subject: [PATCH] Added Nexus to the mining and parser logic --- MarketPlaces/Initialization/markets_mining.py | 3 +++ MarketPlaces/Initialization/prepare_parser.py | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/MarketPlaces/Initialization/markets_mining.py b/MarketPlaces/Initialization/markets_mining.py index d3538b2..ea8269a 100644 --- a/MarketPlaces/Initialization/markets_mining.py +++ b/MarketPlaces/Initialization/markets_mining.py @@ -23,6 +23,7 @@ from MarketPlaces.M00nkeyMarket.crawler_selenium import crawler as crawlerM00nke from MarketPlaces.ViceCity.crawler_selenium import crawler as crawlerViceCity from MarketPlaces.HiddenMarket.crawler_selenium import crawler as crawlerHiddenMarket from MarketPlaces.RobinhoodMarket.crawler_selenium import crawler as crawlerRobinhoodMarket +from MarketPlaces.Nexus.crawler_selenium import crawler as crawlerNexus import configparser import time @@ -115,6 +116,8 @@ if __name__ == '__main__': crawlerHiddenMarket() elif mkt == "RobinhoodMarket": crawlerRobinhoodMarket() + elif mkt == "Nexus": + crawlerNexus() diff --git a/MarketPlaces/Initialization/prepare_parser.py b/MarketPlaces/Initialization/prepare_parser.py index 32655be..afb85b2 100644 --- a/MarketPlaces/Initialization/prepare_parser.py +++ b/MarketPlaces/Initialization/prepare_parser.py @@ -19,6 +19,7 @@ from MarketPlaces.LionMarketplace.parser import * from MarketPlaces.TorMarket.parser import * from MarketPlaces.HiddenMarket.parser import * from MarketPlaces.RobinhoodMarket.parser import * +from MarketPlaces.Nexus.parser import * from MarketPlaces.Classifier.classify_product import predict @@ -175,6 +176,8 @@ def new_parse(marketPlace, url, createLog): rmm = tormarket_description_parser(soup) elif marketPlace == "RobinhoodMarket": rmm = Robinhood_description_parser(soup) + elif marketPlace == "Nexus": + rmm = nexus_description_parser(soup) # key = u"Pr:" + rmm[0].upper()[:desc_lim1] + u" Vendor:" + rmm[13].upper()[:desc_lim2] key = u"Url:" + os.path.basename(line2).replace(".html", "") @@ -246,6 +249,8 @@ def new_parse(marketPlace, url, createLog): rw = tormarket_listing_parser(soup) elif marketPlace == "RobinhoodMarket": rw = Robinhood_listing_parser(soup) + elif marketPlace == "Nexus": + rw = nexus_listing_parser(soup) else: parseError = True