Skip to content

Commit

Permalink
_build_xpath() parametro seccion=None
Browse files Browse the repository at this point in the history
  • Loading branch information
PabloCastellano committed Jun 29, 2016
1 parent 279ee1c commit 7939d82
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bormeparser/borme.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,10 @@ def get_sizes(self, seccion=None, provincia=None):
sizes[cve] = int(size)
return sizes

def _build_xpath(self, seccion, provincia=None):
def _build_xpath(self, seccion=None, provincia=None):
"""
Devuelve una lista con los elementos item
"""
if seccion and provincia:
xpath = u'//sumario/diario/seccion[@num="{}"]/emisor/item/titulo[text()="{}"]'.format(seccion, provincia)
elif seccion:
Expand Down

0 comments on commit 7939d82

Please sign in to comment.