MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / detect_platforms

Method detect_platforms

Scripts/Network Tools/Store Scrapper.py:1105–1122  ·  view source on GitHub ↗
(self, html_text: str)

Source from the content-addressed store, hash-verified

1103 # -------------------------------- ανάλυση --------------------------------
1104
1105 def detect_platforms(self, html_text: str) -> None:
1106 lower = html_text.lower()
1107 if "shopify" in lower or "/cdn/shop/" in lower or "shopifyanalytics" in lower:
1108 self.platform.add("shopify")
1109 if "woocommerce" in lower or "/wp-content/" in lower or "/wp-json/" in lower:
1110 self.platform.add("woocommerce")
1111 if "__next_data__" in lower or 'id="__next_data__"' in lower:
1112 self.platform.add("nextjs")
1113 if "__nuxt" in lower:
1114 self.platform.add("nuxt")
1115 if "squarespace" in lower:
1116 self.platform.add("squarespace")
1117 if "wix" in lower or "wixstatic" in lower:
1118 self.platform.add("wix")
1119 if "magento" in lower or "mage/" in lower:
1120 self.platform.add("magento")
1121 if "swell.store" in lower or "swell-js" in lower or "swell.init" in lower or "@swell" in lower:
1122 self.platform.add("swell")
1123
1124 def soup(self, html_text: str) -> BeautifulSoup:
1125 return BeautifulSoup(html_text, "html.parser")

Callers 4

discover_categoriesMethod · 0.95
scrape_product_detailMethod · 0.95

Calls 1

addMethod · 0.45

Tested by

no test coverage detected