net/cache readUrl->read_url / Unicode -> unicode=True

format replace all CammelCase with under_score
This commit is contained in:
j 2012-08-14 15:58:05 +02:00
commit 2de989e188
33 changed files with 243 additions and 254 deletions

View file

@ -3,8 +3,8 @@
import re
import time
from ox import stripTags, findRe
from ox.cache import readUrlUnicode
from ox import strip_tags, findRe
from ox.cache import read_url
import google
@ -21,9 +21,9 @@ def getShowUrl(title):
return None
def getShowData(url):
data = readUrlUnicode(url)
data = read_url(url, unicode=True)
r = {}
r['title'] = stripTags(findRe(data, '<h1>(.*?)</h1>'))
r['title'] = strip_tags(findRe(data, '<h1>(.*?)</h1>'))
r['imdb'] = findRe(data, '<h1><a href=".*?/title/tt(\d.*?)">.*?</a></h1>')
r['episodes'] = {}
#1. 1- 1 1001 7 Aug 05 You Can't Miss the Bear