SPB Git

Repository Public

probe.py 4.7 KB 123 lines python

1# =============================================================================2#                  SP BOUCHER | SOFTWARE & RESEARCH3#             ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING4# =============================================================================5#6# PROJECT METADATA7# -----------------------------------------------------------------------------8# Project          : Fabri·Ka9# File             : scripts/probe.py10# Module           : scripts11# Repository       : https://git.spboucher.ai/fabri-ka12# Created          : 2026-08-1213# Last Modified    : 2026-08-1214#15# =============================================================================16# AUTHOR & PROFESSIONAL AFFILIATION17# =============================================================================18#19# Author           : Simon-Pierre Boucher20# Position         : Professor of Finance21# Institution      : Université du Québec en Outaouais (UQO)22# Department       : Département des sciences administratives23# Organization     : SP Boucher24#25# Website          : https://spboucher.ai26# Git              : https://git.spboucher.ai27#28# =============================================================================29# OFFICIAL CONTACT DIRECTORY30# =============================================================================31#32# General          : info@spboucher.ai33# Professional     : contact@spboucher.ai34# Direct           : simon@spboucher.ai35# Research         : research@spboucher.ai36# Development      : dev@spboucher.ai37# Support          : support@spboucher.ai38# Security/Admin   : admin@spboucher.ai39# Notifications    : notifications@spboucher.ai40#41# Preferred Contact: contact@spboucher.ai42#43# =============================================================================44# COPYRIGHT & INTELLECTUAL PROPERTY45# =============================================================================46#47# Copyright (c) 202648# Simon-Pierre Boucher49#50# All rights reserved where applicable.51#52# This file is governed by the applicable project license,53# copyright notices, institutional agreements and relevant law.54#55# Unless expressly authorized by the applicable license or56# rights holder, copying, redistribution, sublicensing,57# publication and commercial exploitation are not permitted.58#59# Existing third-party rights and notices remain unaffected.60#61# =============================================================================62# CONFIDENTIALITY & SECURITY63# =============================================================================64#65# Classification   : Public66# Distribution     : Public repository; use is governed by the project license67# Security Contact : admin@spboucher.ai68#69# Access to this source does not independently grant permission70# to redistribute or disclose confidential materials.71#72# Do not embed credentials, private keys, access tokens,73# certificates or confidential personal information.74#75# =============================================================================76# LICENSE & MAINTENANCE77# =============================================================================78#79# License          : None specified (no license file in this repository)80# Maintainer       : Simon-Pierre Boucher81# Technical Contact: dev@spboucher.ai82#83# =============================================================================84# END OF SP BOUCHER SOURCE HEADER85# =============================================================================8687import requests, sys, concurrent.futures as cf88URLS = [89 "https://www.alimentsduquebec.com/",90 "https://lesproduitsduquebec.com/",91 "https://signelocal.com/",92 "https://www.metiersdart.ca/",93 "https://mangeonslocal.upa.qc.ca/",94 "https://vinsduquebec.com/",95 "https://cidreduquebec.com/",96 "https://ambq.ca/",97 "https://www.fromagesdici.com/",98 "https://erabledici.ca/",99 "https://www.terroiretsaveurs.com/",100 "https://www.ampq.ca/",101 "https://www.icriq.com/",102 "https://mazonequebec.com/",103 "https://www.donneesquebec.ca/",104 "https://uqmd.ca/",105 "https://www.economusees.com/",106 "https://conseildesarts? no",107]108HDRS={"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126 Safari/537.36"}109def probe(u):110    if " " in u: return (u,"skip","","")111    try:112        r = requests.get(u, headers=HDRS, timeout=15, allow_redirects=True)113        t = r.text.lower()114        plat = []115        for sig,name in [("wp-content","wordpress"),("cdn.shopify","shopify"),("squarespace","squarespace"),("wixstatic","wix"),("drupal","drupal"),("woocommerce","woocommerce")]:116            if sig in t: plat.append(name)117        return (u, r.status_code, r.url, ",".join(plat), len(r.text))118    except Exception as e:119        return (u, "ERR", str(e)[:80], "", 0)120with cf.ThreadPoolExecutor(10) as ex:121    for res in ex.map(probe, URLS):122        print(res)123
Files main
Menu

Theme