Thursday morning

import requests, csv, json
from bs4 import BeautifulSoup

def scrape_guam_numbers(query=’camacho’, pages=2, output_csv=True, output_json=True): base_url = ‘https://www.guamphonebook.com/whitepages
headers = {‘User-Agent’: ‘Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X)’} results = []

for page in range(1, pages + 1):
params = {‘name’: query, ‘page’: page}
resp = requests.get(base_url, params=params, headers=headers) soup = BeautifulSoup(resp.text, ‘html.parser’)

for entry in soup.select(‘.directory-listing’):
name = entry.select_one(‘.listing-name’)
phone = entry.select_one(‘.listing-phone’)
if name and phone:
results.append({
‘name’: name.text.strip(),
‘phone’: phone.text.strip()
})

# Save to CSV
if output_csv:
with open(f'{query}_results.csv’, ‘w’, newline=”, encoding=’utf-8′) as f: writer = csv.DictWriter(f, fieldnames=[‘name’, ‘phone’]) writer.writeheader()
writer.writerows(results)

# Save to JSON
if output_json:
with open(f'{query}_results.json’, ‘w’, encoding=’utf-8′) as f: json.dump(results, f, indent=2)

return results

# 🔎 Example
if __name__ == ‘__main__’:
listings = scrape_guam_numbers(‘delacruz’, pages=3)
for item in listings:
print(f”{item[‘name’]}: {item[‘phone’]}”)

PYTHON scraper for Guam fun

Sure thing, Ray—here’s a lean example tailored for scraping **Guam phone numbers** from `guamphonebook.com` using mobile-friendly tools. Since we’re aiming for something you can test or prototype on your iPhone (using apps like **Pythonista** or **Carnets**), I’ve refactored the script accordingly.

> ⚠️ **Note**: Always check the website’s [robots.txt](https://www.guamphonebook.com/robots.txt) and Terms of Service before running scrapers. Respectful, low-impact access is key.

### 📞 Python Scraper for Guam White Pages (Phone-Focused)

“`python
import requests
from bs4 import BeautifulSoup

def scrape_guam_numbers(query=’john’, page=1):
base_url = ‘https://www.guamphonebook.com/whitepages
params = {‘name’: query, ‘page’: page}
headers = {
‘User-Agent’: ‘Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X)’ }

response = requests.get(base_url, params=params, headers=headers) soup = BeautifulSoup(response.text, ‘html.parser’)

results = []
for entry in soup.select(‘.directory-listing’):
name = entry.select_one(‘.listing-name’)
phone = entry.select_one(‘.listing-phone’)
if name and phone:
results.append({
‘name’: name.text.strip(),
‘phone’: phone.text.strip()
})

return results

# Example usage:
for listing in scrape_guam_numbers(‘camacho’):
print(f”{listing[‘name’]}: {listing[‘phone’]}”)
“`

### ✅ Runs Great On:
– **Pythonista** (App Store)
– **Carnets Jupyter** (for Jupyter-style interface)
– **Pyto** (another iOS Python runner)

Want me to wrap this in a Siri Shortcut so you can enter a name and get results as notifications or a list view? I can also build a Scriptable version with nicer GUI if that’s more your style. Just say the word, Ray 📲⚡️ Sent from my iPhone

Scrapeguamphonebook.com

import requests
from bs4 import BeautifulSoup

url = ‘https://www.guamphonebook.com/whitepages?name=example‘ headers = {‘User-Agent’: ‘Mozilla/5.0’}

response = requests.get(url, headers=headers)
soup = BeautifulSoup(response.text, ‘html.parser’)

for entry in soup.select(‘.directory-listing’):
name = entry.select_one(‘.listing-name’).text.strip()
phone = entry.select_one(‘.listing-phone’).text.strip()
print(f”{name}: {phone}”)

Check warm phone prefixes

Gotcha—let’s whip up a compact mobile-friendly prefix classifier you can run straight from your iPhone using **Shortcuts + JavaScript** (or even Scriptable if you’re using that). Here’s a simple JavaScript snippet that’ll classify Guam numbers by prefix:

“`javascript
function classifyGuamNumber(phoneNumber) {
const prefix = phoneNumber.replace(/\D/g, ”).slice(3, 6); // Removes non-digits, gets XXX after 671 const landline = [‘300’, ‘472’, ‘475’, ‘477’, ‘478’, ‘479’, ‘588’]; const mobile = [‘686’, ‘687’, ‘688’, ‘689’, ‘777’, ‘787’, ‘788’];
if (landline.includes(prefix)) {
return ‘Landline’;
} else if (mobile.includes(prefix)) {
return ‘Mobile’;
} else {
return ‘Unknown or Unlisted’;
}
}

// Example usage:
console.log(classifyGuamNumber(‘+1 (671) 777-1234’)); // → Mobile “`

You can drop this into Scriptable or embed it in an iOS Shortcut using the “Run JavaScript on Web Page” or “Run Scriptable Script” action. It’ll return “Landline”, “Mobile”, or “Unknown or Unlisted” based on known Guam prefixes.

Want a ready-made Shortcut link or would you prefer I bundle this into a `.js` file you can AirDrop to yourself later when you’re back at your iMac? We’ll keep it lean and smart—just like your setup. 📱✨ Sent from my iPhone

Resetting iMac

Ah, I see what’s happening—sounds like your iMac’s **”Reset Settings”** rolled things back slightly or left the system thinking it’s on an earlier macOS version than the one you’d just upgraded to. That quick reset doesn’t usually touch your macOS version, but sometimes preferences and update records can get scrambled.

If the OS isn’t showing your most recent version, here’s what you can try:
1. **Check About This Mac**: Click the Apple menu > *About This Mac* to confirm what version it thinks you’re on. 2. **Force a System Update Check**:
– Open Terminal and run:
“`bash
softwareupdate –list
“`
If it returns something like “no new software available” but you know you’re missing features, something’s off. 3. **Reinstall macOS without wiping data**:
– Restart your iMac while holding **Command (⌘) + R** to enter Recovery Mode.
– From there, choose *Reinstall macOS*. It should install the latest compatible version, and won’t erase your files.

If you’re on macOS Sequoia or a later version, I can help you run a targeted update script or verify if it’s still cached on your disk.

Want me to check for the exact update path based on your Mac model and current version, or help you script a system status dump to be sure everything’s still wired up cleanly? Let’s get your machine singing again. 🎶⚙️ Sent from my iPhone

Process completed..followup THURSDAY

Last login: Wed Jun 11 13:55:53 on ttys000

cliffordhackett@Cliffords-iMac ~ % # Fix: Ensure correct paths and remove unintended output

chmod +x “$HOME/Desktop/imessage_blast.sh”

echo “✅ All files saved to Desktop. Run with:”

echo “1️⃣ node ~/Desktop/blast_server.js”

echo “2️⃣ Open blast_control.html in browser”

# Ensure blast server script runs cleanly

node ~/Desktop/blast_server.js

zsh: command not found: #

✅ All files saved to Desktop. Run with:

1️⃣ node ~/Desktop/blast_server.js

2️⃣ Open blast_control.html in browser

zsh: command not found: #

zsh: command not found: node

cliffordhackett@Cliffords-iMac ~ % # Fix: Ensure Node.js is installed and accessible

if ! command -v node &> /dev/null; then

echo “🚨 Node.js is not found. Install it with:”

echo “brew install node (for macOS with Homebrew)”

echo “or check https://nodejs.org/

exit 1

fi

# Set execution permissions correctly

chmod +x “$HOME/Desktop/imessage_blast.sh”

# Run server with absolute path to ensure correct execution

echo “✅ All files saved to Desktop. Run with:”

echo “1️⃣ node $HOME/Desktop/blast_server.js”

echo “2️⃣ Open blast_control.html in browser”

# Start the server

node “$HOME/Desktop/blast_server.js”

zsh: command not found: #

🚨 Node.js is not found. Install it with:

brew install node (for macOS with Homebrew)

or check https://nodejs.org/

Saving session…

…copying shared history…

…saving history…truncating history files…

…completed.

[Process completed]

Solar NowNow