Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
juliomalegria committed Jan 28, 2015
0 parents commit ab401dd
Show file tree
Hide file tree
Showing 10 changed files with 516 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .gitignore
@@ -0,0 +1,13 @@
*.py[cod]
*.db
*~
*.egg
*.egg-info
dist
build
eggs
sdist
develop-eggs
.installed.cfg
pip-log.txt
.DS_Store
18 changes: 18 additions & 0 deletions LICENSE.txt
@@ -0,0 +1,18 @@
The MIT-Zero License

Copyright (c) 2015 Julio M Alegria

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
3 changes: 3 additions & 0 deletions MANIFEST.in
@@ -0,0 +1,3 @@
recursive-include craigslist *
include *.rst
include *.txt
82 changes: 82 additions & 0 deletions README.rst
@@ -0,0 +1,82 @@
python-craigslist
=================

A simple `Craigslist <http://www.craigslist.org>`__ wrapper.

License: `MIT-Zero <https://romanrm.net/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?

.. code:: python
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!

.. code:: python
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 <https://github.com/juliomalegria/python-craigslist/issues>`__. I'll be happy to help you! :-)
2 changes: 2 additions & 0 deletions REQUIREMENTS.txt
@@ -0,0 +1,2 @@
requests==2.4.1
beautifulsoup4==4.3.2
1 change: 1 addition & 0 deletions VERSION.txt
@@ -0,0 +1 @@
1.0.0

0 comments on commit ab401dd

Please sign in to comment.