Skip to main content

Simple Craigslist wrapper.

Project description

A simple Craigslist wrapper.

License: MIT-Zero.

Disclaimer

  • I don’t work for or have any affiliation with Craigslist.

  • This code should not be used for crawling or downloading data from Craigslist.

Classes

  • CraigslistCommunity

  • CraigslistEvents

  • CraigslistForSale

  • CraigslistGigs

  • CraigslistHousing

  • CraigslistJobs

  • CraigslistPersonals

  • CraigslistResumes

  • CraigslistServices

Examples

Looking for a room in San Francisco?

from craigslist import CraigslistHousing

cl_h = CraigslistHousing(site='sfbay', area='sfc', category='roo',
                         filters={'max_price': 1200, 'private_room': True})

for result in cl_h.get_results(sort_by='newest', geotagged=True):
    print result

{
    'id': u'4851150747',
    'name': u'Near SFSU, UCSF and NEWLY FURNISHED - CLEAN, CONVENIENT and CLEAN!',
    'url': u'http://sfbay.craigslist.org/sfc/roo/4851150747.html',
    'datetime': u'2015-01-27 23:44',
    'price': u'$1100',
    'where': u'inner sunset / UCSF',
    'has_image': False,
    'has_map': True,
    'geotag': (37.738473, -122.494721)
}
# ...

Everyone loves free food!

from craigslist import CraigslistEvents

cl_e = CraigslistEvents(site='newyork', filters={'free': True, 'food': True})

for result in cl_e.get_results(sort_by='newest', limit=5):
    print result

{
    'id': u'4866178242',
    'name': u'Lituation Thursdays @ Le Reve',
    'url': u'http://newyork.craigslist.org/mnh/eve/4866178242.html',
    'datetime': u'1/29',
    'price': None,
    'where': u'Midtown East',
    'has_image': True,
    'has_map': True,
    'geotag': None
}
# ...

Support

If you find any bug or you want to propose a new feature, please use the issues tracker. I’ll be happy to help you! :-)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-craigslist-1.0.0.tar.gz (10.7 kB view details)

Uploaded Source

File details

Details for the file python-craigslist-1.0.0.tar.gz.

File metadata

File hashes

Hashes for python-craigslist-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e53508d63843ce1688316f2cfa70963ef7a6c4ceb110436b47a5982ee9c676f0
MD5 0c09ef4a5821cc4ea13a3c01bb7698bb
BLAKE2b-256 2012c15e1ebac2fd7c5eea2106b7171a071469459d688c9154cde3cfc06089f3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page