[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: `curl -s "https://www.gottahavecoups.com/api/v1/deals?limit=20&sort=newest" | python3 -c "import sys,json; d=json.load(sys.stdin); deals=d if isinstance(d,list) else d.get('deals',[]); [print(f\"{x['id']}|{x.get('title','')[:60]}|${x.get('price','')}|{x.get('discount_percentage',0)}%\") for x in deals[:15]]"`
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: Thursday, February 12th, 2026 — 4:57 PM (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 task to post a deal to X (Twitter) and Pinterest. Let me follow the workflow:

1. First, I need to fetch deals from the API
2. Check which ones haven't been posted yet
3. Pick a good one (50%+ off, popular brand, etc.)
4. Download the image
5. Build a tweet (under 280 chars, proper format)
6. Validate the tweet
7. Post to X using Maya VM
8. Post to Pinterest using Maya VM
9. Record the post

Let me start by fetching the deals.

exec

curl -s "https://www.gottahavecoups.com/api/v1/deals?limit=20&sort=newest" | python3 -c "import sys,json; d=json.load(sys.stdin); deals=d if isinstance(d,list) else d.get('deals',[]); [print(f\"{x['id']}|{x.get('title','')[:60]}|${x.get('price','')}|{x.get('discount_percentage',0)}%\") for x in deals[:15]]"


/bin/bash: line 1: import sys,json; d=json.load(sys.stdin); deals=d if isinstance(d,list) else d.get('deals',[]); [print(f"{x['id']}|{x.get('title','')[:60]}|${x.get('price','')}|{x.get('discount_percentage',0)}%") for x in deals[:15]]: bad substitution

Command exited with code 1


The command had issues with quote escaping. Let me try a different approach - save the python script to a file first or use a simpler method.

curl -s "https://www.gottahavecoups.com/api/v1/deals?limit=20&sort=newest" -o /tmp/deals.json && cat /tmp/deals.json | python3 -c "import sys,json; d=json.load(sys.stdin); deals=d if isinstance(d,list) else d.get('deals',[]); [print(f'{x[\"id\"]}|{x.get(\"title\",\"\")[:60]}|${x.get(\"price\",\"\")}|{x.get(\"discount_percentage\",0)}%') for x in deals[:15]]"


/bin/bash: line 1: import sys,json; d=json.load(sys.stdin); deals=d if isinstance(d,list) else d.get('deals',[]); [print(f'{x["id"]}|{x.get("title","")[:60]}|${x.get(\"price\",\"\")}|{x.get("discount_percentage",0)}%') for x in deals[:15]]: bad substitution

Command exited with code 1


Let me write the python script to a file first, then execute it.

write

import sys,json
d=json.load(sys.stdin)
deals=d if isinstance(d,list) else d.get('deals',[])
for x in deals[:15]:
    print(f"{x['id']}|{x.get('title','')[:60]}|${x.get('price','')}|{x.get('discount_percentage',0)}%")


Successfully wrote 217 bytes to /tmp/parse_deals.py


Now let me fetch the deals and parse them.

exec

curl -s "https://www.gottahavecoups.com/api/v1/deals?limit=20&sort=newest" | python3 /tmp/parse_deals.py


Traceback (most recent call last):
  File "/tmp/parse_deals.py", line 2, in <module>
    d=json.load(sys.stdin)
      ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/json/__init__.py", line 293, in load
    return loads(fp.read(),
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Command exited with code 1


The curl might be failing. Let me try to check what we get from the API.

curl -s "https://www.gottahavecoups.com/api/v1/deals?limit=20&sort=newest" -o /tmp/deals.json && head -c 500 /tmp/deals.json


(no output)


No output means the file might be empty or the API is not responding. Let me check the file size.

ls -la /tmp/deals.json && cat /tmp/deals.json


-rw-rw-r-- 1 crogers2287 crogers2287 0 Feb 12 16:57 /tmp/deals.json


The file is empty. Let me try with verbose curl to see what's happening.

curl -v "https://www.gottahavecoups.com/api/v1/deals?limit=20&sort=newest" 2>&1 | head -50


% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Host www.gottahavecoups.com:443 was resolved.
* IPv6: 2606:4700:3033::ac43:b9d7, 2606:4700:3037::6815:441e
* IPv4: 172.67.185.215, 104.21.68.30
*   Trying 172.67.185.215:443...
* Connected to www.gottahavecoups.com (172.67.185.215) port 443
* ALPN: curl offers h2,http/1.1
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: /etc/ssl/certs
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
{ [19 bytes data]
* TLSv1.3 (IN), TLS handshake, Certificate (11):
{ [2548 bytes data]
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
{ [80 bytes data]
* TLSv1.3 (IN), TLS handshake, Finished (20):
{ [52 bytes data]
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.3 (OUT), TLS handshake, Finished (20):
} [52 bytes data]
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 / X25519 / id-ecPublicKey
* ALPN: server accepted h2
* Server certificate:
*  subject: CN=gottahavecoups.com
*  start date: Jan 24 01:17:46 2026 GMT
*  expire date: Apr 24 02:16:10 2026 GMT
*  subjectAltName: host "www.gottahavecoups.com" matched cert's "*.gottahavecoups.com"
*  issuer: C=US; O=Google Trust Services; CN=WE1
*  SSL certificate verify ok.
*   Certificate level 0: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA256
*   Certificate level 1: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA384
*   Certificate level 2: Public key type EC/secp384r1 (384/192 Bits/secBits), signed using ecdsa-with-SHA384
} [5 bytes data]
* using HTTP/2
* [HTTP/2] [1] OPENED stream for https://www.gottahavecoups.com/api/v1/deals?limit=20&sort=newest
* [HTTP/2] [1] [:method: GET]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: www.gottahavecoups.com]
* [HTTP/2] [1] [:path: /api/v1/deals?limit=20&sort=newest]
* [HTTP/2] [1] [user-agent: curl/8.5.0]
* [HTTP/2] [1] [accept: */*]
} [5 bytes data]


The connection seems to be established. Let me see if there's a response body.

curl -sS "https://www.gottahavecoups.com/api/v1/deals?limit=20&sort=newest" -w "\nHTTP_CODE: %{http_code}\nSIZE: %{size_download}\n"


HTTP_CODE: 307
SIZE: 0


It's a 307 redirect. Let me follow redirects with -L.

curl -sL "https://www.gottahavecoups.com/api/v1/deals?limit=20&sort=newest" | python3 /tmp/parse_deals.py


33854|Puppia Soft Dog Harness No Cho...Release Buckle,Brown,X-Larg|$10.49|53%
33851|GIGABYTE X870 EAGLE WIFI7 Motherboard $170 + Free Shipping|$170.0|None%
33847|YMMV Clearance - TCL 85" Class QM7K Series QD-Mini LED QLED |$900.0|None%
33845|Dyson WashG1 Wet Hard Floor Cleaner (Matte Black/Ultra Blue)|$399.99|None%
33844|Otter MOMO Toddler Little Girls Oxford Shoes Mary Jane Flat |$13.77|None%
33846|99.97 | 28-Liter Osprey Ozone Laptop Backpack (Black) at Ama|$99.97|41%
33843|The Hillman Group 532446 Thumb Tacks,White,40-Pack|$1.89|36%
33850|Adidas Men's Train Essentials Feelready Training Tee $5.76|$5.76|None%
33842|10.99*:Simple Deluxe Portable Camping Stool,14.4 Inch,300 lb|$10.99|None%
33840|Under Armour Men's UA Velocity Shirt (2 Colors) $8.53|$8.53|None%
33838|11.97 | Taylormade Driver Headcover at Amazon|$11.97|52%
33837|Dymatize Elite 100% Whey Protein Powder,Cookies & Cream,25g |$27.3|None%
33835|Mainstays Electric Standing Desk,Height Adjustable Desk,44 x|$149.0|None%
33841|Electric Air Duster,Multi-Gear Adjustable 130000RPM,Recharge|$9.99|None%
33832|34.08*:adidas Country Japan Men's Shoes (Bright Royal / Clou|$34.08|None%


Now I have the deals. Let me check which ones haven't been posted yet. I'll start with the most promising ones:
- 33854: Puppia Soft Dog Harness - 53% off, $10.49
- 33838: Taylormade Driver Headcover - 52% off, $11.97

Let me check if these have been posted.

cd /home/crogers2287/.openclaw/workspace-ghc-marketing && python3 scripts/posted_db.py check 33854 x


POSTED:NO


cd /home/crogers2287/.openclaw/workspace-ghc-marketing && python3 scripts/posted_db.py check 33838 x


POSTED:YES


33838 is already posted. Let me check 33854 (dog harness) - it's 53% off which is good, and under $10. Let me also check a few others.

cd /home/crogers2287/.openclaw/workspace-ghc-marketing && python3 scripts/posted_db.py check 33850 x


Let me check the Puppia dog harness (33854) since it's 53% off and seems like a good deal. I'll get more details on it.

curl -sL "https://www.gottahavecoups.com/api/v1/deals/33854" | python3 -c "import sys,json; d=json.load(sys.stdin); print(json.dumps(d, indent=2))"


Amazon price drop:Puppia Soft Dog Harness No Cho...Release Buckle,Brown,X-Large - down 53.81% ($12.22) to $10.49 from $22.71


Good deal - 53% off, was $22.71 now $10.49. It's a Puppia Soft Dog Harness. Let me download the share image and create a tweet.

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


-rw-rw-r-- 1 crogers2287 crogers2287 71366 Feb 12 16:58 /tmp/deal_img.jpg


Image downloaded. Now let me create the tweet. Need to be under 280 chars with:
- Hook (emoji + deal highlight)
- Product name + price
- 5-8 hashtags
- Link LAST: gottahavecoups.com/deal/<id>

write

🐶 53% OFF! Puppia Soft Dog Harness — No choke design with quick release buckle

Was $22.71 → NOW $10.49!

Perfect for comfy walks 🦮

#DogDeals #PetSupplies #DogHarness #AmazonDeals #PetLovers #Savings #GottaHaveCoups

gottahavecoups.com/deal/33854


Successfully wrote 249 bytes to /tmp/tweet.txt


exec

cd /home/crogers2287/.openclaw/workspace-ghc-marketing && python3 scripts/validate_tweet.py "$(cat /tmp/tweet.txt)"


VALID


The tweet is valid. Now I need to:
1. SCP the tweet file and image to Maya VM
2. Run the X posting script on Maya VM
3. Run the Pinterest posting script on Maya VM
4. Record the post

Let me start by sending the files to Maya and posting to X.

scp /tmp/tweet.txt maya@maya:/tmp/tweet.txt && scp /tmp/deal_img.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.


Files copied. Now let me post to X using the twikit script on Maya VM.

ssh maya@maya "python3 /home/maya/workspace/scripts/x_twikit_post2.py 33854 --file /tmp/tweet.txt" 2>&1


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


X post was successful! Tweet ID: 2021992346699608106. Now let me post to Pinterest.

ssh maya@maya "python3 /home/maya/workspace/scripts/pin_post_v2.py 33854 'Puppia Soft Dog Harness - 53% OFF!' 'No choke design with quick release buckle. Was $22.71, now just $10.49! Perfect for comfy dog walks. #DogDeals #PetSupplies #AmazonDeals' 1134485031073239531" 2>&1


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/2V0o6hM4.jpeg
Pin create: 200
SUCCESS! Pin ID: 1134484962398608162


Both posts were successful! Now let me record the posts in the database.

cd /home/crogers2287/.openclaw/workspace-ghc-marketing && python3 scripts/posted_db.py record 33854 x "2021992346699608106" "https://x.com/GottaHaveCoups/status/2021992346699608106"


Recorded 33854 for x


Now let me record the Pinterest post as well.

cd /home/crogers2287/.openclaw/workspace-ghc-marketing && python3 scripts/posted_db.py record 33854 pinterest "1134484962398608162" "https://pinterest.com/pin/1134484962398608162"


Recorded 33854 for pinterest


Now let me log this in the memory file for today.

write

## Deal Post - 4:58 PM UTC

Posted deal #33854 to X and Pinterest:
- **Product:** Puppia Soft Dog Harness No Choke (Brown, X-Large)
- **Price:** $10.49 (was $22.71) — 53% OFF
- **X Post:** https://x.com/GottaHaveCoups/status/2021992346699608106
- **Pinterest Pin:** https://pinterest.com/pin/1134484962398608162
- **Status:** Successfully posted to both platforms


Successfully wrote 364 bytes to /home/crogers2287/.openclaw/workspace-ghc-marketing/memory/2026-02-12.md


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

**✅ Deal Posted Successfully**

| Platform | Status | Link |
|----------|--------|------|
| **X (Twitter)** | ✅ Posted | https://x.com/GottaHaveCoups/status/2021992346699608106 |
| **Pinterest** | ✅ Posted | https://pinterest.com/pin/1134484962398608162 |

**Deal Details:**
- **Product:** Puppia Soft Dog Harness (No choke, quick release buckle)
- **Price:** $10.49 (was $22.71) — **53% OFF**
- **Deal ID:** 33854
- **Posted via:** Maya VM (twikit + py3-pinterest)

**Actions Completed:**
- ✅ Fetched 15 latest deals from API
- ✅ Checked `posted_db.py` — deal 33854 was unposted
- ✅ Downloaded share image (71KB)
- ✅ Built & validated tweet (249 chars, 7 hashtags)
- ✅ Posted to X via Maya VM twikit
- ✅ Posted to Pinterest board "🔥 Today's Best Deals"
- ✅ Recorded both posts in `posted_db.py`
- ✅ Logged activity to `memory/2026-02-12.md`