Skip to content

Searches the craigslist free section to find items that people in the wanted section will pay for and notifies you on discord.

Notifications You must be signed in to change notification settings

crackkillz/freebot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

Craigslist Discord Bot README

Overview

This Discord bot scrapes Craigslist for free items and wanted posts, matches them based on similarity, and sends the results to a Discord channel. It's built with Python, using libraries like requests, BeautifulSoup, difflib, csv, discord.py, pandas, and asyncio.

Prerequisites

  • Python 3.6 or higher
  • A Discord account and bot token
  • Basic knowledge of creating and managing Discord bots

Installation

Clone the repository and install the required Python libraries:

git clone https://github.com/crackkillz/freebot.git
cd freebot
pip install requests beautifulsoup4 discord.py pandas

Configuration

  1. Discord Bot Token: Obtain a Discord bot token and replace YOUR_BOT_TOKEN_PLACEHOLDER in the script with your actual token.

  2. Channel and URL Setup: Replace CHANNEL_ID_PLACEHOLDER, FREE_SECTION_URL_PLACEHOLDER, and WANTED_SECTION_URL_PLACEHOLDER with your Discord channel ID and Craigslist section URLs.

Running the Bot

Start the bot by running the following command in your terminal:

python freebot.py

Features

  • Craigslist Scraping: Uses BeautifulSoup to scrape Craigslist.
  • Matching Logic: Utilizes difflib.SequenceMatcher for comparing post titles.
  • Discord Integration: Sends summaries and individual matches to a Discord channel.
  • Error Handling: Basic handling for web requests and Discord interactions.

Customization

  • You can modify the command prefix, bot token, channel ID, and URLs in the script.
  • Adjust the similarity threshold in find_matches_with_links for custom matching logic.
  • Customize the message format sent to Discord in send_results_to_discord.

Limitations

  • The bot's functionality is dependent on Craigslist's HTML structure, which is subject to change.
  • It does not support real-time monitoring and needs to be run manually.

Contributions

Contributions are welcome! Please adhere to standard coding practices and document your changes.

License

This project is open-source and available under the MIT License.


Note: Replace [repository-url] and [project-directory] with the actual URL of your repository and the name of your project directory. This README is a guideline and might require adjustments based on your specific requirements and setup.

About

Searches the craigslist free section to find items that people in the wanted section will pay for and notifies you on discord.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages