Skip to main content

Iterate through Craig's list

Project description

Read listings Pythonically.

Examples

Generate listings.

from craigsgenerator import Section
for listing in Section('austin','sub'):
    print(listing)

Additional arguments get passed to requests.get.

from craigsgenerator import Section
proxies = {'https':'example.com'}
for listing in Section('austin','sub', proxies = proxies):
    print(listing)

Downloaded files are cached by default and refreshed if they’re older than a day. Change the directory by specifying the cachedir.

from craigsgenerator import Section
for listing in Section('austin','sub', cachedir = 'downloads'):
    print(listing)

Disable caching by setting the cachedir to None.

from craigsgenerator import Section
for listing in Section('austin','sub', cachedir = None):
    print(listing)

Get the full text of the listing with the fulltext function.

from craigsgenerator import Section
for listing in Section('austin','sub'):
    print(listing)
    print(fulltext(listing))

Project details


Release history Release notifications

History Node

0.1.1

History Node

0.1.0

History Node

0.0.13

This version
History Node

0.0.12

History Node

0.0.11

History Node

0.0.10

History Node

0.0.9

History Node

0.0.8

History Node

0.0.7

History Node

0.0.6

History Node

0.0.5

History Node

0.0.4

History Node

0.0.3

History Node

0.0.2

History Node

0.0.1

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
craigsgenerator-0.0.12.tar.gz (3.3 kB) Copy SHA256 hash SHA256 Source None Feb 17, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page