On rend plus robuste l'import (dans le cas où il manque des informations)
This commit is contained in:
parent
b9ecde46e5
commit
3520045856
@ -144,10 +144,15 @@ class ExtractorFacebook(Extractor):
|
||||
self.get_neighbor_events(event[k])
|
||||
elif k in ExtractorFacebook.FacebookEvent.rules:
|
||||
for nk, rule in ExtractorFacebook.FacebookEvent.rules[k].items():
|
||||
error = False
|
||||
c = event[k]
|
||||
for ki in rule:
|
||||
c = c[ki]
|
||||
self.elements[nk] = c
|
||||
if c is not None:
|
||||
c = c[ki]
|
||||
else:
|
||||
error = True
|
||||
if not error:
|
||||
self.elements[nk] = c
|
||||
else:
|
||||
self.elements[k] = event[k]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user