pboProperty Ontology
python21 lines975 B
RawDownload
1#!/usr/bin/env python3
2import subprocess
3from pathlib import Path
4
5from scrape_bookmarks import clean_markdown
6
7
8ROOT = Path(__file__).resolve().parent
9pages = {
10 "0036-rooming-house-new-property-australia.md": "https://newproperty.com.au/property-types/rooming-house/",
11 "0037-a-guide-to-single-tenant-vs-multi-tenant-commercial-real-estate-faqs-answered-binary-stream.md": "https://binarystream.com/a-guide-to-single-tenant-vs-multi-tenant-commercial-real-estate-faqs-answered/",
12}
13
14for filename, url in pages.items():
15 result = subprocess.run(["w3m", "-dump", "-T", "text/html", url], check=False, capture_output=True, text=True)
16 if result.returncode != 0 or len(result.stdout.strip()) < 300:
17 print(f"No fallback content for {filename}")
18 continue
19 title = filename[5:-3].replace("-", " ").title()
20 (ROOT / "property-pages" / filename).write_text(clean_markdown(result.stdout, title), encoding="utf-8")
21 print(f"Recovered {filename}")