Skip to content

Commit 358d00f

Browse files
author
TechStack Global
committed
feat: Add LG 27US500-W 4K Monitor Review and integrate into hubs
1 parent 8bbb48a commit 358d00f

10 files changed

+430
-4
lines changed

amazon-stack.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,15 @@ <h3><a href="posts/surface-laptop-studio-2-review.html">Surface Laptop Studio 2<
116116
</div>
117117
</div>
118118

119-
<div class="blog-card glass-panel">
119+
<div class="blog-card glass-panel" style="border-top: 3px solid var(--accent);">
120120
<div class="blog-category">Home Office</div>
121-
<h3><a href="#">Best Monitor for Remote Work</a></h3>
122-
<p>Expand your workspace. Vetted 4K and ultrawide screens for maximum productivity.</p>
123-
<div class="card-meta"><span>Coming Soon</span></div>
121+
<h3><a href="posts/lg-27us500-w-ultrafine-monitor-review.html">LG 27US500-W Ultrafine Review</a>
122+
</h3>
123+
<p>Expand your workspace. The 4K monitor providing retina-level text clarity for students and
124+
professionals.</p>
125+
<div class="card-meta"><span>9.3/10</span> <a
126+
href="posts/lg-27us500-w-ultrafine-monitor-review.html" class="read-more">Read Review
127+
&rarr;</a></div>
124128
</div>
125129
</div>
126130
</section>
58.2 KB
Loading
56.3 KB
Loading
75 KB
Loading
65.9 KB
Loading

blog.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,20 @@ <h1>Tech Stack Reviews & Guides</h1>
5555
</div>
5656

5757
<div class="blog-grid" id="blog-posts-container">
58+
<!-- LG 4K Monitor Review -->
59+
<div class="blog-card glass-panel" style="border-top: 3px solid var(--accent);">
60+
<div class="blog-category">Remote Setup</div>
61+
<img src="https://images-na.ssl-images-amazon.com/images/P/B0D9R7Q449.01._SCLZZZZZZZ_.jpg"
62+
alt="LG 27US500-W Ultrafine 4K"
63+
style="width:100%; height:200px; object-fit:contain; border-radius:8px; margin-bottom:1rem; padding: 1rem; background: white;">
64+
<h3><a href="posts/lg-27us500-w-ultrafine-monitor-review.html">LG 27US500-W Ultrafine Monitor Review</a>
65+
</h3>
66+
<p>The definitive budget 4K monitor upgrade for remote workers, students, and freelancers.</p>
67+
<div class="card-meta"><span>Feb 26, 2026</span> <a
68+
href="posts/lg-27us500-w-ultrafine-monitor-review.html" class="read-more">Read Review &rarr;</a>
69+
</div>
70+
</div>
71+
5872
<!-- New Student Posts First for Volume -->
5973
<div class="blog-card glass-panel">
6074
<div class="blog-category">Student Tech</div>

download_images.py

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import os
2+
import re
3+
import urllib.request
4+
from pathlib import Path
5+
6+
# Setup directories
7+
base_dir = Path(r"c:\Users\PMLS\Desktop\Youtube Shorts\b2b_blog")
8+
assets_dir = base_dir / "assets" / "images" / "products"
9+
assets_dir.mkdir(parents=True, exist_ok=True)
10+
11+
# Regex to find Amazon image URLs
12+
img_regex = re.compile(r'https://m\.media-amazon\.com/images/I/([A-Za-z0-9_\-\.]+?\.jpg)')
13+
14+
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64)'}
15+
16+
def download_image(url, filename):
17+
filepath = assets_dir / filename
18+
if not filepath.exists():
19+
print(f"Downloading {url} to {filepath}")
20+
req = urllib.request.Request(url, headers=headers)
21+
try:
22+
with urllib.request.urlopen(req) as response, open(filepath, 'wb') as out_file:
23+
out_file.write(response.read())
24+
except Exception as e:
25+
print(f"Failed to download {url}: {e}")
26+
return filepath
27+
28+
def process_file(html_file):
29+
print(f"Processing {html_file.name}...")
30+
content = html_file.read_text(encoding='utf-8')
31+
matches = img_regex.findall(content)
32+
if not matches:
33+
return
34+
35+
for img_id in set(matches):
36+
url = f"https://m.media-amazon.com/images/I/{img_id}"
37+
download_image(url, img_id)
38+
39+
# Calculate relative path
40+
if html_file.parent.name == "posts":
41+
rel_path = f"../assets/images/products/{img_id}"
42+
else:
43+
rel_path = f"assets/images/products/{img_id}"
44+
45+
print(f"Replacing {url} with {rel_path} in {html_file.name}")
46+
content = content.replace(url, rel_path)
47+
48+
html_file.write_text(content, encoding='utf-8')
49+
50+
def main():
51+
# Process root HTML files
52+
for html_file in base_dir.glob("*.html"):
53+
process_file(html_file)
54+
55+
# Process posts HTML files
56+
posts_dir = base_dir / "posts"
57+
for html_file in posts_dir.glob("*.html"):
58+
process_file(html_file)
59+
60+
print("Done handling all images globally!")
61+
62+
if __name__ == "__main__":
63+
main()

0 commit comments

Comments
 (0)