Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ab401dd
Showing
10 changed files
with
516 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
*.py[cod] | ||
*.db | ||
*~ | ||
*.egg | ||
*.egg-info | ||
dist | ||
build | ||
eggs | ||
sdist | ||
develop-eggs | ||
.installed.cfg | ||
pip-log.txt | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
recursive-include craigslist * | ||
include *.rst | ||
include *.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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! :-) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
requests==2.4.1 | ||
beautifulsoup4==4.3.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.0.0 |
Oops, something went wrong.