[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 — 3: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 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 (50%+ off, popular brand, etc.)
4. Download the share image
5. Build and validate a tweet
6. Post to X using Maya VM
7. Post to Pinterest using Maya VM
8. Record the posts

Let me start by fetching the deals.

I'll execute the deal posting workflow. Let me start by fetching the deals and checking what's already been posted.

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)}%\")"


33976|3.29*:Fox Run Mini Ladle Set,Plastic,2-Piece,Regular White a|PRICE:3.29|None%
33977|Ring Spotlight Cam Plus,Battery (newest model),Home or busin|PRICE:109.99|None%
33978|Centrum Restful Sleep Menopause Support Tablets,Supplement w|PRICE:7.46|None%
33972|Flexi Hose Expandable Garden Hose with 8 Function Nozzle,100|PRICE:49.99|None%
33969|The Privatization of Everythin...rica and How We Can Fight B|PRICE:2.99|76%
33968|Revl Fruits 100% Juice,No Add...,32 fl oz.Carton (Pack of 6|PRICE:20.7|68%
33970|38.97:Nike Mens Club Open Hem Brushed Fleece Pants,Green Aby|PRICE:38.97|None%
33973|Majestic Pure Essential Oil with Glass Dropper - 100% Pure a|PRICE:8.49|None%
33961|179.00:DEWALT 20V MAX XR Battery 6 Ah Lithium Ion,2-Pack,Pre|PRICE:179.0|None%
33962|29.87:Simply 16x25x1 Air Filter,MERV 8,6 Pack,For Home AC Fu|PRICE:29.87|None%
33963|Humann SuperBeets Heart Chews Pomegranate Berry Flavor,60 Co|PRICE:33.95|None%
33964|15.19:KITCHENAID Quilted Cotton Terry Cloth Oven Mitt,Pot Ho|PRICE:15.19|None%
33971|39.99:Ring Video Wired Doorbell newest model,Two-Way Talk,ad|PRICE:39.99|None%
33953|Oakley Meta HSTN,Black | Smart AI Glasses for Men,Women 8 Ho|PRICE:381.65|None%
33954|Men Cotton Linen Shirts Short Sleeve Button Down Relaxed Fit|PRICE:8.49|None%


Good, I have the deals. Now I need to check which ones have already been posted. Let me check the deals with good discounts first:

- 33969: 76% off (book)
- 33968: 68% off (Revl Fruits juice)

Let me check if these have been posted to X already.

python3 scripts/posted_db.py check 33969 x && python3 scripts/posted_db.py check 33968 x && python3 scripts/posted_db.py check 33953 x


POSTED:NO
POSTED:YES
POSTED:NO


So:
- 33969 (book, 76% off) - NOT posted
- 33968 (Revl Fruits juice, 68% off) - ALREADY POSTED
- 33953 (Oakley glasses) - NOT posted

Let me check a few more to find a good one with a discount. Let me also check the deal details for 33969.

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'] == 33969:
        print(json.dumps(d, indent=2))
        break"


Amazon price drop:The Privatization of Everythin...rica and How We Can Fight Back - down 76.98% ($10.00) to $2.99 from $12.99


This is a book about privatization in America. 76% off at $2.99 (was $12.99). That's a good deal, but books might not be the most engaging content. Let me check more deals to see if there's something more appealing. Let me look at some more deals that weren't in the first 15.

python3 -c "
import urllib.request, json
req = urllib.request.Request('https://www.gottahavecoups.com/api/v1/deals?limit=50&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[:30]:
    dp = d.get('discount_percentage') or 0
    if dp and dp >= 50:
        print(f\"{d['id']}|{d.get('title','')[:70]}|PRICE:\${d.get('price','')}|{dp}% off\")"


33969|The Privatization of Everythin...rica and How We Can Fight Back|PRICE:$2.99|76% off
33968|Revl Fruits 100% Juice,No Add...,32 fl oz.Carton (Pack of 6|PRICE:$20.7|68% off
33950|Long Train Runnin':Our Story of The Doobie Brothers|PRICE:$2.99|70% off


So the only high-discount deals are:
- 33969: Book, 76% off
- 33968: Revl Fruits juice (already posted)
- 33950: Doobie Brothers book, 70% off

Let me check if 33950 has been posted.

python3 scripts/posted_db.py check 33950 x


POSTED:NO


Let me get the full details for 33950 and compare with 33969 to decide which is better to post.

python3 -c "
import urllib.request, json
req = urllib.request.Request('https://www.gottahavecoups.com/api/v1/deals?limit=50&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'] == 33950:
        print(json.dumps(d, indent=2))
        break"


Amazon price drop:Long Train Runnin':Our Story of The Doobie Brothers - down 70.01% ($6.98) to $2.99 from $9.97


Both deals are books at $2.99. The Doobie Brothers book (33950) has a quality_score of 10.0 vs 7.0 for the privatization book, and music/biography content might be more engaging than a political book. Let me go with 33950 - the Doobie Brothers book.

Now I need to:
1. Download the share image
2. Build a tweet
3. Validate it
4. Post to X via Maya VM
5. Post to Pinterest via Maya VM
6. Record the post

Let me start.

I'll go with the Doobie Brothers book (33950) - 70% off at $2.99, quality score 10. Let me download the image and build the tweet.

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


-rw-rw-r-- 1 crogers2287 crogers2287 116037 Feb 13 03:57 /tmp/deal_33950.jpg


Good, image downloaded. Now let me build a tweet. I need:
- Hook (emoji + deal highlight)
- Product name + price
- 5-8 hashtags
- Link LAST: gottahavecoups.com/deal/<id>
- KEEP UNDER 280 CHARS

Let me craft this:

"🎸 Rock history for $2.99!

Long Train Runnin': Our Story of The Doobie Brothers - 70% off (was $9.97)

#DoobieBrothers #MusicBooks #BookDeals #RockMusic #KindleDeals #AmazonDeals #MusicHistory #BargainHunter

gottahavecoups.com/deal/33950"

Let me count the characters...

python3 scripts/validate_tweet.py '🎸 Rock history for $2.99!

Long Train Runnin': Our Story of The Doobie Brothers - 70% off (was $9.97)

#DoobieBrothers #MusicBooks #BookDeals #RockMusic #KindleDeals #AmazonDeals #MusicHistory #BargainHunter

gottahavecoups.com/deal/33950'


/bin/bash: -c: line 3: syntax error near unexpected token `('
/bin/bash: -c: line 3: `Long Train Runnin': Our Story of The Doobie Brothers - 70% off (was $9.97)'

Command exited with code 2


The single quote is causing issues. Let me use a different approach - write to a file first.

write

🎸 Rock history for $2.99!

Long Train Runnin': Our Story of The Doobie Brothers - 70% off (was $9.97)

#DoobieBrothers #MusicBooks #BookDeals #RockMusic #KindleDeals #AmazonDeals #MusicHistory #BargainHunter

gottahavecoups.com/deal/33950


Successfully wrote 239 bytes to /tmp/tweet_33950.txt


exec

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


VALID


The tweet validates. Now I need to post to X using Maya VM. Let me follow the instructions:

1. Copy the tweet text to Maya VM
2. Copy the image to Maya VM
3. Run the twikit script on Maya VM

Tweet validated ✓ Now posting to X via Maya VM.

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


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


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

ssh maya@maya "python3 /home/maya/workspace/scripts/x_twikit_post2.py 33950 --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-33950.jpg (116037 bytes)
Uploading image...
Image uploaded, media_id: 2022158342030823424
Posting tweet...
SUCCESS! Tweet ID: 2022158345860444639
URL: https://x.com/GottaHaveCoups/status/2022158345860444639


Excellent! X post successful. Now I need to post to Pinterest using the py3-pinterest script on Maya VM.

X posted successfully! Now posting to Pinterest.

ssh maya@maya "python3 /home/maya/workspace/scripts/pin_post_v2.py 33950 'Long Train Runnin: Our Story of The Doobie Brothers - $2.99 (70% off)' 'Rock history deal! The Doobie Brothers autobiography is 70% off - only $2.99 (was $9.97). Perfect for music lovers! #DoobieBrothers #MusicBooks #BookDeals' 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/2XgTCZyl.jpeg
Pin create: 200
SUCCESS! Pin ID: 1134484962398639227


Pinterest posted successfully! Now I need to record the posts in the database.

Both posts successful! Recording to database and logging.

python3 scripts/posted_db.py record 33950 x 2022158345860444639 "https://x.com/GottaHaveCoups/status/2022158345860444639"


Recorded 33950 for x


Now let me log this to the daily memory file.

write

# Deal Post Log - 2026-02-13

## 3:57 AM UTC (Feb 12, 10:57 PM ET)
**Deal:** Long Train Runnin': Our Story of The Doobie Brothers (ID: 33950)
- Price: $2.99 (was $9.97)
- Discount: 70% off
- Source: Amazon

**Posted to X:**
- Tweet ID: 2022158345860444639
- URL: https://x.com/GottaHaveCoups/status/2022158345860444639
- Image: deal_33950.jpg (116KB)

**Posted to Pinterest:**
- Pin ID: 1134484962398639227
- Board: Today's Best Deals
- Status: Success

**Notes:** Used Maya VM for both posts. Twikit cookies valid. py3-pinterest working.


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


**Deal Posted Successfully** ✓

**Deal:** Long Train Runnin': Our Story of The Doobie Brothers
**Price:** $2.99 (was $9.97) — 70% off

**X Post:**
- Tweet ID: 2022158345860444639
- URL: https://x.com/GottaHaveCoups/status/2022158345860444639

**Pinterest Pin:**
- Pin ID: 1134484962398639227
- Board: Today's Best Deals

Both posts completed via Maya VM. Logged to memory/2026-02-13.md.