[cron:6dd85dd2-28ce-411f-b2de-8106e314da47 Deal Post - X + Pinterest (every 30 min)] SCHEDULED TASK: Post 1 deal to X and Pinterest using Maya VM twikit/py3-pinterest.

## CRITICAL: Use Maya VM, NOT Fred social-poster
- X: twikit v2.3.3 on Maya VM (`ssh maya@maya`)
- Script: `/home/maya/workspace/scripts/x_twikit_post2.py`
- Cookies: `/home/maya/workspace/x_cookies.json`

## Workflow
1. **Fetch deals with Python (NOT shell pipes with $):**
   ```python3
   import urllib.request, json
   req = urllib.request.Request('https://www.gottahavecoups.com/api/v1/deals?limit=20&sort=newest', headers={'User-Agent':'Mozilla/5.0'})
   data = json.loads(urllib.request.urlopen(req, timeout=15).read())
   deals = data if isinstance(data, list) else data.get('deals', [])
   for d in deals[:15]:
       print(f"{d['id']}|{d.get('title','')[:60]}|PRICE:{d.get('price','')}|{d.get('discount_percentage',0)}%")
   ```
2. Check hash: `python3 scripts/posted_db.py check <deal_id> x`
3. If POSTED:YES — SKIP, pick another
4. Pick unposted deal (50%+ off, popular brand, limited time, freebies, under $10)
5. Download share image: `wget -q "https://www.gottahavecoups.com/api/v1/share/image/<deal_id>" -O /tmp/deal_img.jpg`
6. **BUILD TWEET:** Hook + value + 5-8 hashtags + link LAST. KEEP UNDER 280 CHARS.
7. **MANDATORY VALIDATION:** `python3 scripts/validate_tweet.py '<tweet_text>'` — If INVALID, STOP and pick different deal.
8. **POST TO X (Maya VM twikit):**
   ```bash
   ssh maya@maya "cat > /tmp/tweet.txt << 'TWEET'
   <tweet text here>
   TWEET"
   scp /tmp/deal_img.jpg maya@maya:/tmp/deal_img.jpg
   ssh maya@maya "python3 /home/maya/workspace/scripts/x_twikit_post2.py <deal_id> --file /tmp/tweet.txt"
   ```
9. **POST TO PINTEREST (Maya VM py3-pinterest):**
   ```bash
   ssh maya@maya "python3 /home/maya/workspace/scripts/pin_post_v2.py <deal_id> '<title>' '<description>' 1134485031073239531"
   ```
10. Record posts: `python3 scripts/posted_db.py record <deal_id> x <tweet_id> <url>`
11. Log in memory/YYYY-MM-DD.md

## If X cookies expired
Run: `ssh maya@maya "DISPLAY=:0 python3 /home/maya/workspace/scripts/extract_x_cookies.py"`

## Tweet format (STRICT)
- Hook (emoji + deal highlight)
- Product name + price (with $, e.g., "$12.99")
- 5-8 hashtags
- Link LAST: gottahavecoups.com/deal/<id>
- KEEP UNDER 280 CHARS

## NEVER post if validation fails:
- Shell artifacts (/bin/bash, python3 -c)
- Broken prices (.20 instead of $10.20)
- Broken emojis (�)
- > 280 chars
Current time: Friday, February 13th, 2026 — 2:57 AM (UTC)

Return your summary as plain text; it will be delivered automatically. If the task explicitly calls for messaging a specific external recipient, note who/where it should go instead of sending it yourself.


The user wants me to execute a scheduled cron task to post a deal to X and Pinterest. Let me follow the workflow step by step.

1. First, I need to fetch deals from the API
2. Check which ones have been posted
3. Pick an unposted deal
4. Build and validate a tweet
5. Post to X and Pinterest
6. Record the posts

Let me start by fetching deals and checking posted status.

I'll execute the scheduled deal post. Let me start by fetching deals and checking what's available.

exec

python3 -c "
import urllib.request, json
req = urllib.request.Request('https://www.gottahavecoups.com/api/v1/deals?limit=20&sort=newest', headers={'User-Agent':'Mozilla/5.0'})
data = json.loads(urllib.request.urlopen(req, timeout=15).read())
deals = data if isinstance(data, list) else data.get('deals', [])
for d in deals[:15]:
    print(f\"{d['id']}|{d.get('title','')[:60]}|PRICE:{d.get('price','')}|{d.get('discount_percentage',0)}%\")
"


33950|Long Train Runnin':Our Story of The Doobie Brothers|PRICE:2.99|70%
33947|40.20:Under Armour Mens Matchplay Longsleeve Golf Polo,(001)|PRICE:40.2|None%
33949|Neutrogena Evenly Clear Acne Cleansing Face Mask 4.2 fl.oz $|PRICE:8.99|None%
33946|OWYN Only What You Need Pro Elite Vegan High Protein Keto Sh|PRICE:22.99|51%
33941|Rubbermaid Brilliance Food Storage Containers,18 Piece Set $|PRICE:28.32|None%
33939|adidas Kids Superlite No Show Socks for Boys & Girls (6 Pair|PRICE:6.98|69%
33944|Rayovac C Batteries,Ultra Pro C Cell Batteries Alkaline,6 Co|PRICE:6.99|None%
33936|LOKITHOR JA302 2500A Jump Starter w/ 150PSI Air Compressor +|PRICE:69.58|None%
33937|30 W x 56 H Foldable Cucumber Trellis with Zip Tiles 50% off|PRICE:26.64|50%
33935|Michel et Augustin Cookies,Individually Wrapped Snacks,Gourm|PRICE:5.69|None%
33933|LA MODERNA,Cavatappi Tornillos Pasta,16 oz (Pack of 1) | Enr|PRICE:1.24|None%
33942|rivmount Winter Gloves with Waterproof/Touchscreen/Warm,Blac|PRICE:5.59|None%
33940|DONAMA Cervical Pillow for Neck and Shoulder,Contour Memory |PRICE:15.59|27%
33925|Master of the Cauldron:The si...ic saga of 'Lord of the Isle|PRICE:2.99|80%
33929|Creative Co-Op Heavily Distres...al Tray with Black Frame & |PRICE:19.99|35%


Good, I have deals. Now let me check which ones haven't been posted yet. I'll check a few promising ones - deals with good discounts or interesting products. Let me check the top candidates:

1. 33950 - Doobie Brothers book - 70% off at $2.99
2. 33946 - OWYN Protein Shake - 51% off at $22.99
3. 33939 - adidas Kids Socks - 69% off at $6.98
4. 33937 - Cucumber Trellis - 50% off at $26.64
5. 33925 - Master of the Cauldron book - 80% off at $2.99

Let me check posted status for these.

Now let me check which deals haven't been posted yet:

python3 scripts/posted_db.py check 33950 x && python3 scripts/posted_db.py check 33946 x && python3 scripts/posted_db.py check 33939 x && python3 scripts/posted_db.py check 33925 x && python3 scripts/posted_db.py check 33937 x


POSTED:NO
POSTED:NO
POSTED:NO
POSTED:NO
POSTED:NO


All these deals are unposted. Let me pick a good one. The Doobie Brothers book at 70% off for $2.99 is a great deal - music fans love this kind of thing. Or the adidas socks at 69% off for $6.98 - practical, good brand, under $10.

Let me go with the adidas Kids Superlite No Show Socks - 69% off at $6.98 is a solid deal on a popular brand, under $10 which matches the criteria.

Actually, wait - let me check if I have more details about the deals to make sure I'm picking the best one. Let me get more info on a couple candidates.

Let me get more details on the best candidates:

python3 -c "
import urllib.request, json
req = urllib.request.Request('https://www.gottahavecoups.com/api/v1/deals?limit=20&sort=newest', headers={'User-Agent':'Mozilla/5.0'})
data = json.loads(urllib.request.urlopen(req, timeout=15).read())
deals = data if isinstance(data, list) else data.get('deals', [])
for d in deals:
    if d['id'] in [33939, 33950, 33925]:
        print(f\"ID: {d['id']}\")
        print(f\"Title: {d.get('title','')}\")
        print(f\"Price: {d.get('price','')}\")
        print(f\"Original: {d.get('original_price','')}\")
        print(f\"Discount: {d.get('discount_percentage',0)}%\")
        print(f\"Store: {d.get('store','')}\")
        print('---')
"


ID: 33950
Title: Long Train Runnin':Our Story of The Doobie Brothers
Price: 2.99
Original: 9.97
Discount: 70%
Store:
---
ID: 33939
Title: adidas Kids Superlite No Show Socks for Boys & Girls (6 Pairs) Lightweight $6.98
Price: 6.98
Original: None
Discount: 69%
Store:
---
ID: 33925
Title: Master of the Cauldron:The si...ic saga of 'Lord of the Isles
Price: 2.99
Original: 14.99
Discount: 80%
Store:
---


The adidas socks at 69% off for $6.98 is a great practical deal on a popular brand. Let me go with that one - deal ID 33939.

Now I need to:
1. Download the share image
2. Build a tweet (keep under 280 chars, hook + value + 5-8 hashtags + link LAST)
3. Validate the tweet
4. Post to X via Maya VM
5. Post to Pinterest via Maya VM
6. Record the posts

Let me download the image and build the tweet.

I'll go with the **adidas Kids Superlite No Show Socks** - 69% off, popular brand, under $10. Let me download the image and build the tweet.

wget -q "https://www.gottahavecoups.com/api/v1/share/image/33939" -O /tmp/deal_img.jpg && ls -la /tmp/deal_img.jpg


-rw-rw-r-- 1 crogers2287 crogers2287 70725 Feb 13 02:57 /tmp/deal_img.jpg


Good, image downloaded. Now let me build the tweet. I need:
- Hook with emoji
- Product name + price
- 5-8 hashtags
- Link LAST (gottahavecoups.com/deal/33939)
- Keep under 280 chars

Draft:
🔥 69% OFF adidas Kids Socks!

adidas Kids Superlite No Show Socks (6 Pairs) — just $6.98! Keep little feet comfy with breathable, lightweight socks from a brand you trust.

#adidas #kidsfashion #backtoschool #deals #savings #gottahavecoups #parenting #shopping

https://www.gottahavecoups.com/deal/33939

Let me count characters...

Now let me build and validate the tweet:

cat > /tmp/tweet.txt << 'TWEET'
🔥 69% OFF adidas Kids Socks!

adidas Kids Superlite No Show Socks (6 Pairs) — just $6.98! Comfy, breathable & perfect for school.

#adidas #kidsfashion #backtoschool #deals #savings #gottahavecoups #parenting #shopping

https://www.gottahavecoups.com/deal/33939
TWEET
cat /tmp/tweet.txt


🔥 69% OFF adidas Kids Socks!

adidas Kids Superlite No Show Socks (6 Pairs) — just $6.98! Comfy, breathable & perfect for school.

#adidas #kidsfashion #backtoschool #deals #savings #gottahavecoups #parenting #shopping

https://www.gottahavecoups.com/deal/33939


Good, now let me validate the tweet using the validate_tweet.py script.

python3 scripts/validate_tweet.py "$(cat /tmp/tweet.txt)"


VALID


Tweet is valid. Now I need to:
1. Copy the tweet text and image to Maya VM
2. Run the X posting script via SSH
3. Run the Pinterest posting script via SSH
4. Record the posts

Let me do this step by step.

Tweet validated. Now posting to X via Maya VM:

scp /tmp/deal_img.jpg maya@maya:/tmp/deal_img.jpg && ssh maya@maya "cat > /tmp/tweet.txt <3 'TWEET'
🔥 69% OFF adidas Kids Socks!

adidas Kids Superlite No Show Socks (6 Pairs) — just $6.98! Comfy, breathable & perfect for school.

#adidas #kidsfashion #backtoschool #deals #savings #gottahavecoups #parenting #shopping

https://www.gottahavecoups.com/deal/33939
TWEET"


Warning: Permanently added 'maya' (ED25519) to the list of known hosts.
Warning: Permanently added 'maya' (ED25519) to the list of known hosts.
/bin/bash: line 1: 3: No such file or directory
/bin/bash: line 2: 🔥: command not found
/bin/bash: -c: line 4: syntax error near unexpected token `('
/bin/bash: -c: line 4: `adidas Kids Superlite No Show Socks (6 Pairs) — just .98! Comfy, breathable & perfect for school.'

Command exited with code 2


The heredoc syntax got messed up. Let me use a simpler approach - write the file locally and then scp it.

Let me fix the approach - I'll SCP the files properly:

scp /tmp/deal_img.jpg maya@maya:/tmp/deal_img.jpg && scp /tmp/tweet.txt maya@maya:/tmp/tweet.txt


Warning: Permanently added 'maya' (ED25519) to the list of known hosts.
Warning: Permanently added 'maya' (ED25519) to the list of known hosts.


Good, files transferred. Now let me run the X posting script on Maya VM.

ssh maya@maya "python3 /home/maya/workspace/scripts/x_twikit_post2.py 33939 --file /tmp/tweet.txt"


Warning: Permanently added 'maya' (ED25519) to the list of known hosts.
Cookies loaded
Authenticated as: @GottaHaveCoups
Image downloaded: /home/maya/workspace/downloads/deal-33939.jpg (70725 bytes)
Uploading image...
Image uploaded, media_id: 2022143331263033345
Posting tweet...
SUCCESS! Tweet ID: 2022143336094830706
URL: https://x.com/GottaHaveCoups/status/2022143336094830706


Excellent! X post successful. Tweet ID: 2022143336094830706. Now let me post to Pinterest.

X posted successfully! Now posting to Pinterest:

ssh maya@maya "python3 /home/maya/workspace/scripts/pin_post_v2.py 33939 'adidas Kids Superlite No Show Socks (6 Pairs)' '🔥 69% OFF! Just $6.98 for adidas Kids Superlite No Show Socks (6 Pairs). Comfy, breathable & perfect for back to school! #adidas #kidsfashion #deals #backtoschool #gottahavecoups' 1134485031073239531"


Warning: Permanently added 'maya' (ED25519) to the list of known hosts.
Loaded 8 cookies
Boards: 200
Found 7 boards (raw type: dict)
Raw keys: ['all_boards', 'boards_shortlist', 'create_suggestions']
  🔥 Today’s Best Deals (id: 1134485031073239531)
  Limited Time Promo Codes (id: 1134485031073239590)
  Gifts Under $50 (id: 1134485031073239588)
  Amazon Deals & Coupons (id: 1134485031073239559)
  Home & Kitchen Savings (id: 1134485031073239570)
Image upload: 200
Image URL: https://i.pinimg.com/previews/yeoE3GTF.jpeg
Pin create: 200
SUCCESS! Pin ID: 1134484962398637217


Pinterest posted successfully too! Pin ID: 1134484962398637217. Now I need to record both posts in the database and log to memory.

Both posts successful! Now recording to database:

python3 scripts/posted_db.py record 33939 x 2022143336094830706 https://x.com/GottaHaveCoups/status/2022143336094830706 && python3 scripts/posted_db.py record 33939 pinterest 1134484962398637217 https://pinterest.com/pin/1134484962398637217


Recorded 33939 for x
Recorded 33939 for pinterest


Great, both posts recorded. Now let me log this to the daily memory file.

Now logging to memory:

write

## Deal Post - Fri Feb 13, 2026 2:57 AM UTC

**Deal ID:** 33939
**Product:** adidas Kids Superlite No Show Socks (6 Pairs)
**Price:** $6.98 (69% OFF)

### Posts
- **X:** https://x.com/GottaHaveCoups/status/2022143336094830706
  - Tweet ID: 2022143336094830706
- **Pinterest:** Pin ID 1134484962398637217

### Tweet Content
🔥 69% OFF adidas Kids Socks!

adidas Kids Superlite No Show Socks (6 Pairs) — just $6.98! Comfy, breathable & perfect for school.

#adidas #kidsfashion #backtoschool #deals #savings #gottahavecoups #parenting #shopping


Successfully wrote 543 bytes to memory/2026-02-13.md


All done. Let me provide a summary of what was completed.

---

## ✅ Deal Post Complete

**Deal Posted:** adidas Kids Superlite No Show Socks (6 Pairs) - 69% OFF at $6.98

| Platform | Status | Link/ID |
|----------|--------|---------|
| **X (Twitter)** | ✅ SUCCESS | https://x.com/GottaHaveCoups/status/2022143336094830706 |
| **Pinterest** | ✅ SUCCESS | Pin ID: 1134484962398637217 |

**Actions Taken:**
1. Fetched 15 latest deals from API
2. Checked posted status - deal 33939 was unposted
3. Downloaded share image (70KB)
4. Built tweet with hook, value prop, 8 hashtags, link last
5. ✅ Validation passed (no shell artifacts, proper formatting, <280 chars)
6. Posted to X via Maya VM twikit (authenticated as @GottaHaveCoups)
7. Posted to Pinterest via Maya VM py3-pinterest ("🔥 Today's Best Deals" board)
8. Recorded both posts to posted_deals.json
9. Logged activity to memory/2026-02-13.md