Code Monkey home page Code Monkey logo

craigslist-emailer's Introduction

Craigslist-Emailer

MIT license

Automation Script for sending an email to each Craigslist post

This script searches for a keyword in a craigslist URL, and then automatically sends an email to each poster. The body of the email can be set in the options variable.

Implemented in nodejs using the Selenium module.

Disclaimer: Please Note that this is a research project. I am by no means responsible for any usage of this tool. Use on your own behalf. Iโ€™m also not responsible if your get into any trouble due to extensive use of this tool.

Table of Contents

Getting started

Basic Installation:

1. git clone https://github.com/ourarash/craigslist-emailer.git
2. cd craigslist-emailer
3. npm install

Set searchURL, searchTerm, your email, password, emailBody, and SMTP servers in index.js

// Fill out these options
var options = {
    searchURL: "https://sfbay.craigslist.org/d/furniture/search/fua",   //The page we are searching
    searchTerm: "tv",                                                   //The keyword we are searching
    printBody: false,
    printTitle: true,
    badWords: ["badword1", "badword2"],                                 //Detects bad words in title and body of each text
    fromName: 'Your-name',                                              //Sender name in the email being sent
    email: "[email protected]",                                             //Your email address
    password: "password",                                               //Your password
    smtpServer: 'smtp.gmail.com',                                       //SMTP server. Use smtp.gmail.com for gmail
                                                                        //The body of email sent to each poster
    emailBody: `Hi,                                                     

    What is your lowest price?
    
    Thanks,
    John Doe
    `,
};

Gmail Settings:

If you use Gmail, in order to send emails using this script, you will need to set Gmail to allow sending email from less secure sources. Gmail will send you an email with instructions once you run this script for the first time.

Alternatively, you can set it from here: https://myaccount.google.com/lesssecureapps

Chrome Driver

The latest version of Chrome driver is included in this repo, but make sure that you have the latest version by downloading it from here:

https://sites.google.com/a/chromium.org/chromedriver/downloads

Also you will need to download the chromedriver if you are using a non Windows/Mac OS.

Run the Script:

Execute it:

$ node index.js

craigslist-emailer's People

Contributors

ourarash avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.