modifié : INITBASE/loader.py
This commit is contained in:
parent
7a2f91ffb5
commit
b5841f1a9e
@ -6,10 +6,10 @@ import re
|
|||||||
import httplib
|
import httplib
|
||||||
|
|
||||||
def exists(site, path):
|
def exists(site, path):
|
||||||
conn = httplib.HTTPConnection(site)
|
c = httplib.HTTPConnection(site)
|
||||||
conn.request('HEAD', path)
|
c.request('HEAD', path)
|
||||||
response = conn.getresponse()
|
response = conn.getresponse()
|
||||||
conn.close()
|
c.close()
|
||||||
return response.status == 200
|
return response.status == 200
|
||||||
|
|
||||||
def insert (cur, table, dict) :
|
def insert (cur, table, dict) :
|
||||||
@ -108,7 +108,7 @@ try :
|
|||||||
image = child.text.encode('utf-8')
|
image = child.text.encode('utf-8')
|
||||||
|
|
||||||
# On s'interesee qu'aux oeuvres ayant une image
|
# On s'interesee qu'aux oeuvres ayant une image
|
||||||
if image != "NULL" and exists('http://www.augustins.org','/documents/10180/156407/'):
|
if image != "NULL" and exists('http://www.augustins.org:80','/documents/10180/156407/'+image):
|
||||||
if str(datation)+str(datation2) in listeDatation :
|
if str(datation)+str(datation2) in listeDatation :
|
||||||
iddatation = listeDatation[str(datation)+str(datation2)]
|
iddatation = listeDatation[str(datation)+str(datation2)]
|
||||||
else :
|
else :
|
||||||
|
Reference in New Issue
Block a user