net/cache readUrl->read_url / Unicode -> unicode=True
format replace all CammelCase with under_score
This commit is contained in:
parent
c1d0fc6242
commit
2de989e188
33 changed files with 243 additions and 254 deletions
|
|
@ -1,11 +1,11 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vi:si:et:sw=4:sts=4:ts=4
|
||||
import re
|
||||
from ox.net import readUrlUnicode
|
||||
from ox.net import read_url
|
||||
|
||||
def getPosterUrl(id):
|
||||
url = 'http://piratecinema.org/posters/'
|
||||
html = readUrlUnicode(url)
|
||||
html = read_url(url, unicode=True)
|
||||
results = re.compile('src="(.+)" title=".+\((\d{7})\)"').findall(html)
|
||||
for result in results:
|
||||
if result[1] == id:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue