Generic name, naming things is hard. Anyway, this small package will get your Discogs wantlist and search Ebay for those titles. It's not perfect but does a pretty good job. It is set up to search the Records category on Ebay. You can customize this if you wish.
- Extracts your wantlist from Discogs (caches for 24 hours)
- Figures out what to query on Ebay (if it's a 7" it will append
45to a search), it also splits titles with/in them to look for A and B sides, again not perfect. - It caches each ebay search to remember the last price per url of an item, if you have already seen that price, it won't send that item listing again
- If the price changes it will send it to you, I found this makes it more managable for large wantlists
- It emails you this list (using sendgrid, free 25K emails per month)
- Copy
config.sample.phptoconfig.phpand fill in the values EBAY_APPID: Your Ebay API KeyDISCOGS_PERSONAL_TOKEN: Your personal discogs tokenDISCOGS_USERNAME: Yep, you guessed it, your discogs usernameCOUNTRY_CODE: Set the two character country code if you want Ebay results to be targeted to a specific countryTO_ADDRESS: the email in which to send the resultsFROM_ADDRESS: I am sure you know what this is forEMAIL_SUBJECT: The subject of the email that is sentMMG_SUBJECT: The subject for the email if checking MelloMusicGroup inventoryBANDCAMP_SUBJECT: The subject for the email if checking Bandcamp inventoryBANDCAMP_SUBDOMAINS: Array of subdomains to check on bandcampFATBEATS_SUBJECT: The subject for the email if checking Fatbeats inventoryFATBEATS_LABELS: Array of labels to check inventory forSENDGRID_KEY: Your sendgrid API KeyDEBUG: If set totruethe script will only run for 10% of your wantlist
As of 2020-07-01, I added support to keep track of Vinyl inventory on FatBeats for labels. It will only work with label collections. On first run you will get an email of all vinyl release, their price and if they are in stock or not.
Follow the How to Run section below.
As of 2015-02-07, I added support to keep track of Vinyl inventory on MelloMusicGroup. On first run you will get an email of all vinyl release, their price and if they are in stock or not.
After that it will keep track of the prices and inventory, then each time it is run it will see if any prices changes or inventory changed. If so it will only email the release that have changed in some way.
If a new release is posted it will also email you that. If you want to run this script just set up a new cron to run the script once a day. Follow the How to Run section below.
As of 2015-02-19, I added support to keep track of Vinyl inventory on Bandcamp per artist. On first run you will get an email of all vinyl release, their price and if they are in stock or not.
The logic is the same as for MelloMusicGroup above. To configure bandcamp, just place the subdomain for the artist (IE: j-zone) in the array provided in the config sample. You can then just run php bandcamp.php and the script will do the rest.
- Update your
config.phpfile - Run
composer install - $
php index.php - $
php mellomusicgroup.php-- If you want to keep track of MMG inventory - $
php bandcamp.php-- If you want to keep track of Bandcamp artist inventory - $
php fatbeats.php-- If you want to keep track of Fatbeats Label inventory - $
php get-random-release.php-- If you want a random Discogs wantlist item returned to so you can purchase it
I have this running for myself on Google's Computer Engine (Micro Instance). It is set up as a cron to run twice a day. I also have a cron set up that once every 10 days it removes all the Ebay-*.cache files and starts fresh.
If will work locally as well. I decided for Compute Engine to make sure the cron fires since sometimes my computer is off.
I have tested on 5.5.* and 7.0.*.