craigslist-reposter
Simple automation of craigslist listing renewal and reposting:
- Selenium to access craigslist.com, IMAPClient package to authenticate login
- User information is imported from environment variables
- Pings an optional Discord webhook when reposts are completed
Installation
git clone https://github.com/PorkyC/craigslist-reposter.git
cd craigslist-reposter
pip install -r requirements.txt
Usage
- Set environment variables (e.g. for Windows)
SETX CL_USER craigslist_login@gmail.com
SETX CL_PASS craigslistpassword123
SETX CL_EMAIL_PASS gmailpassword123
# Optional: if using a webhook:
SETX DISCORD_WEBHOOK discord.com/webhook-address
- Change CLICK_TYPE in craigslist.py depending on whether script is running on Windows or Mac
# CLICK_TYPE configures which key is used to open the post in a new tab
CLICK_TYPE = Keys.COMMAND # Use this if you are on a Mac
CLICK_TYPE = Keys.CONTROL # Use this if you are on a PC
- Set maximum days a post can be active before reposting, and imap address in reposter.py
# MAX_POST_DAYS configures the maximum number of days after posting before reposting
MAX_POST_DAYS = 11
# IMAP_SERVER for email provider, default for gmail
IMAP_SERVER = 'imap.gmail.com'
- Run reposter.py (can also be scheduled, e.g. Launchd on MacOS) with arg[1]: max reposts allowed and arg[2]: max renewals allowed.
python3 reposter.py 3 8
TODO:
- Improve repost process so that no additional configuration needed between MacOS and Windows
Save and reload Selenium browser session to reduce new logins and verificationsAdded 1/14/2023- Filter verification emails by subject
Metadata
Release files for craigslist-reposter 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| craigslist_reposter-0.2.2.tar.gz | 5.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| craigslist_reposter-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.0 kB
Release files / craigslist_reposter-0.2.2.tar.gz
| Download URL | craigslist_reposter-0.2.2.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce67d942dfe60997067916a1778779fa94757ba4228bc100f237bec513a466d1
|
|
BLAKE2b-256 checksum How to use checksums |
4d013d596720142789548891299a171ca07c503673d2ba60b8ca2cd51677cdb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Release files / craigslist_reposter-0.2.2-py3-none-any.whl
| Download URL | craigslist_reposter-0.2.2-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9e48d27ef64bbaaea1e33ba40c942d9052138509daa5e51427951d2e4ddaaee2
|
|
BLAKE2b-256 checksum How to use checksums |
a7d1285f03017035936fb3deeeb590c71a435922e81e12fcd45aa7ed243cfaa1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|