22 lines
647 B
Markdown
22 lines
647 B
Markdown
# Reddit Post Sidecar
|
|||
|
|
|
||
|
|
A Playwright acceptance test that logs into Reddit with supplied credentials
|
||
|
|
and creates a text post in a given subreddit.
|
||
|
|
|
||
|
|
## One-time setup
|
||
|
|
|
||
|
|
cd sidecars/reddit-post
|
||
|
|
npm install
|
||
|
|
npx playwright install chromium
|
||
|
|
|
||
|
|
## Usage
|
||
|
|
|
||
|
|
./run.sh --username=YOUR_USERNAME --password=YOUR_PASSWORD \
|
||
|
|
--subreddit=test --title="Hello" --body="Post body text" [--headed]
|
||
|
|
|
||
|
|
Prints a single JSON line to stdout and exits 0 on success, exits 1 on
|
||
|
|
failure:
|
||
|
|
|
||
|
|
{"success": true, "url": "https://www.reddit.com/r/test/comments/.../"}
|
||
|
|
{"success": false, "error": "Login did not complete — possible CAPTCHA or 2FA prompt"}
|