InstaFuel_Chatbot_public/scripts/find_csv_urls.py
2026-04-21 11:57:37 +05:30

23 lines
756 B
Python

import csv
CSV_PATH = "wc-product-export-2-11-2025-1762081471517_fixed.csv"
def find_urls():
with open(CSV_PATH, "r", encoding="utf-8-sig") as f:
reader = csv.DictReader(f)
for i, row in enumerate(reader):
if i > 20: break # Check first 20 rows
print(f"-- Row {i} --")
found = False
for k, v in row.items():
if v and ("http://" in v or "https://" in v):
# Filter out image URLs which we know are in 'Images'
if k == "Images": continue
print(f"[{k}]: {v}")
found = True
if not found:
print("No non-image URLs found.")
if __name__ == "__main__":
find_urls()