Iterate through Craig's list
Project description
Craig's Generator
======
Read listings Pythonically.
Examples
---------
Generate listings.
from craigsgenerator import Section
for listing in Section('oakland','sub'):
print(listing)
Additional arguments get passed to ``requests.get``.
from craigsgenerator import Section
proxies = {'https':'example.com'}
for listing in Section('oakland','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('oakland','sub', cachedir = 'downloads'):
print(listing)
Disable caching by setting the ``cachedir`` to ``None``.
from craigsgenerator import Section
for listing in Section('oakland','sub', cachedir = None):
print(listing)
======
Read listings Pythonically.
Examples
---------
Generate listings.
from craigsgenerator import Section
for listing in Section('oakland','sub'):
print(listing)
Additional arguments get passed to ``requests.get``.
from craigsgenerator import Section
proxies = {'https':'example.com'}
for listing in Section('oakland','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('oakland','sub', cachedir = 'downloads'):
print(listing)
Disable caching by setting the ``cachedir`` to ``None``.
from craigsgenerator import Section
for listing in Section('oakland','sub', cachedir = None):
print(listing)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
craigsgenerator-0.0.1.tar.gz
(2.9 kB
view details)
File details
Details for the file craigsgenerator-0.0.1.tar.gz
.
File metadata
- Download URL: craigsgenerator-0.0.1.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2859535d59c98fb7fa4cdcc58b207d1c37178dbd80c331e2dcc42d05afe8104 |
|
MD5 | c6a3435506eabf7994ae15db28a839bd |
|
BLAKE2b-256 | ff1c01b366b3b8574c7ea4b06437acd4e678ba929aa83d437b58310572174f55 |