Code Monkey home page Code Monkey logo

fb-market-python-script's Introduction

Marketplace

Requirements

  • Latest release of Python3
  • Selenium for Python
  • Pyautogui
  • Geckodriver (by Mozilla, found here)
  • Mozilla Firefox

Instructions

  1. Make sure the geckodriver.exe, login.txt, and ads directory are in the same directory as marketplace.exe.

    Documents\MarketplaceProgram\marketplace.py
    Documents\MarketplaceProgram\geckodriver.exe
    Documents\MarketplaceProgram\ads\couch\...
    Documents\MarketplaceProgram\ads\chair\...
    
  2. login.txt should an email and a password on a single line, separated by a comma followed by a space

    [email protected], password123
    
    • If you would like for multiple accounts to post the same ads simply add more login details on separate lines
    [email protected], password123
    [email protected], livinglife
    [email protected], mapleleafs
    
  3. Make sure each ad contains an Ad.txt and at least one image

    Documents\MarketplaceProgram\ads\chair\Ad.txt
    Documents\MarketplaceProgram\ads\chair\chairPicture.jpg
    
  4. Make sure Ad.txt is properly formatted

    • The first line should be the item name
    • The second line should be the item price
    • Everything else should be the item description
    Climbing Shoes
    $100
    Never worn, in the packaging
    Size 42, excellent for slab problems
    If interested call or text 123-456-7890
    
  5. Run marketplace.py from a power shell terminal

    • Let your computer sit by itself for around 30 seconds per ad
    • Because the program uses your mouse and keyboard, you cannot use your computer while it runs
    • You will know it is finished when it stops for longer than 10 seconds (When the last ad from the ads folder is posted)
    • Or when the terminal closes
    • You'll figure it out, its not like it does anything cool like shoot fireworks

Possible TODO's / Personal Notes

  • Allow for multiple accounts, so each ad can be posted to multiple accounts
  • Speed up the program from waiting 2 seconds after every action to on page load
    • Using exclusive waits or something? Waiting for the last element to load then performing our operations
    • Could also just eliminate unnecessary waits, like waiting after the page is already loaded
    • This also isn't that big of a deal if you just leave this to run overnight, but if you really want to pump out as many ads as possible then optimizing for time becomes more important
  • Improve the ad input, using CSV or spreadsheet files instead of notepad
    • Alternatively could just make what goes where in the textfile more clear
    • Potentially just a single spreadsheet, and a folder full of pictures
    • That way you could just name the pictures in the spreadsheet instead of 0,1,2, etc
  • Do some exception handling, so the program won't just die when something goes wrong
    • This isn't that big of a deal, not much should go wrong
    • Basically all I might need is if an ad is formatted incorrectly or doens't have a photo to refresh and move to the next one
  • Hardcoded coordinates for screensize, specifically for remember password
  • Issues with some of the ads
    • Changing how some of the code worked fixed these issues as far as I can tell
  • It seems like a lot of these selected elements could be found just by doing link search instead of element ID, not that element ID is wrong or doesn't work
    • Actually it seems like absolute path is almost necessary for some
  • So I think if I made this in a C language it would be an executable with no other requirements? Im not sure though

fb-market-python-script's People

Contributors

bhlewka avatar

Stargazers

poa00 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.