No description
Find a file
2013-05-31 22:34:06 +02:00
ox episodes without season/episode are season 1, add season besides having it in the title, fixes #1548 2013-05-31 22:34:06 +02:00
.bzrignore rename bt->torrent 2008-04-27 19:10:34 +02:00
README fix import 2012-09-09 18:48:40 +02:00
requirements.txt use setuptools, depend on chardet and feedparser 2010-11-19 20:18:19 +01:00
setup.py use debian version if available 2013-04-24 15:52:49 +02:00
test.sh fix test.sh 2010-07-08 01:28:04 +02:00

python-ox - the web in a dict

Depends:
 python >= 2.6
 python-chardet (http://chardet.feedparser.org/)
 python-feedparser (http://www.feedparser.org/)
 python-lxml (http://codespeak.net/lxml/)          [optional]
 django (otherwise dates < 1900 are not supported) [optional]

Usage:
 import ox
 
 data = ox.cache.read_url('http:/...')
 text = ox.strip_tags(data)
 ox.normalize_newlines(text)
 ox.format_bytes(len(data))

 ox.format_bytes(1234567890)
 '1.15 GB'

 import ox.web.imdb
 imdbId = ox.web.imdb.guess('The Matrix')
 info = ox.web.imdb.Imdb(imdbId)
 info['year']
 1999

For information on ox.django see https://wiki.0x2620.org/wiki/ox.django

Install:
  python setup.py install

Cookies:
  some ox.web modules require user accont information or cookies to work,
  those are saved in ~/.ox/auth.json, most basic form looks like this:
  {
    "key": "value"
  }

Tests:
 nosetests --with-doctest ox