Browse Source

Update 2 files

- /MarketPlaces/Initialization/markets_mining.py
- /MarketPlaces/Initialization/prepare_parser.py
main
Adrian Alcoreza 5 months ago
parent
commit
9cc1b6c69f
2 changed files with 8 additions and 0 deletions
  1. +3
    -0
      MarketPlaces/Initialization/markets_mining.py
  2. +5
    -0
      MarketPlaces/Initialization/prepare_parser.py

+ 3
- 0
MarketPlaces/Initialization/markets_mining.py View File

@ -28,6 +28,7 @@ from MarketPlaces.Torzon.crawler_selenium import crawler as crawlerTorzon
from MarketPlaces.DarkMarket.crawler_selenium import crawler as crawlerDarkMarket from MarketPlaces.DarkMarket.crawler_selenium import crawler as crawlerDarkMarket
from MarketPlaces.DarkDock.crawler_selenium import crawler as crawlerDarkDock from MarketPlaces.DarkDock.crawler_selenium import crawler as crawlerDarkDock
from MarketPlaces.SilkRoad4.crawler_selenium import crawler as crawlerSilkRoad4 from MarketPlaces.SilkRoad4.crawler_selenium import crawler as crawlerSilkRoad4
from MarketPlaces.DarkRoad.crawler_selenium import crawler as crawlerDarkRoad
import configparser import configparser
import os import os
@ -147,5 +148,7 @@ if __name__ == '__main__':
crawlerDarkDock() crawlerDarkDock()
elif mkt == "SilkRoad4": elif mkt == "SilkRoad4":
crawlerSilkRoad4() crawlerSilkRoad4()
elif mkt == "DarkRoad":
crawlerDarkRoad()
print("\nScraping process completed!") print("\nScraping process completed!")

+ 5
- 0
MarketPlaces/Initialization/prepare_parser.py View File

@ -30,6 +30,7 @@ from MarketPlaces.ZeroDay.parser import *
from MarketPlaces.DarkMarket.parser import * from MarketPlaces.DarkMarket.parser import *
from MarketPlaces.DarkDock.parser import * from MarketPlaces.DarkDock.parser import *
from MarketPlaces.SilkRoad4.parser import * from MarketPlaces.SilkRoad4.parser import *
from MarketPlaces.DarkRoad.parser import *
from MarketPlaces.Classifier.classify_product import predict from MarketPlaces.Classifier.classify_product import predict
from Translator.translate import translate from Translator.translate import translate
@ -176,6 +177,8 @@ def parse_listing(marketPlace, listingFile, soup, createLog, logFile):
rw = darkdock_listing_parser(soup) rw = darkdock_listing_parser(soup)
elif marketPlace == "SilkRoad4": elif marketPlace == "SilkRoad4":
rw = silkroad4_listing_parser(soup) rw = silkroad4_listing_parser(soup)
elif marketplace == "DarkRoad":
rw = darkroad_listing_parser(soup)
else: else:
print("MISSING CALL TO LISTING PARSER IN PREPARE_PARSER.PY!") print("MISSING CALL TO LISTING PARSER IN PREPARE_PARSER.PY!")
raise Exception raise Exception
@ -240,6 +243,8 @@ def parse_description(marketPlace, descriptionFile, soup, createLog, logFile):
rmm = darkdock_description_parser(soup) rmm = darkdock_description_parser(soup)
elif marketPlace == "SilkRoad4": elif marketPlace == "SilkRoad4":
rmm = silkroad4_description_parser(soup) rmm = silkroad4_description_parser(soup)
elif marketPlace == "DarkRoad":
rmm = darkroad_description_parser(soup)
else: else:
print("MISSING CALL TO DESCRIPTION PARSER IN PREPARE_PARSER.PY!") print("MISSING CALL TO DESCRIPTION PARSER IN PREPARE_PARSER.PY!")
raise Exception raise Exception


Loading…
Cancel
Save