data_collection/gazette/spiders/ba_vitoria_da_conquista.py
def parse(self, response):
        """
        Extracts the gazette items from the web page.
        """
        boxes = response.css(".box-diario")
        links_xpath = './/a[text()[normalize-space(.) = "Visualizar Diário"]]/@href'
        for box in boxes:
            parsing_date = box.re(r"diario-(\d{8})")[0]
            parsing_date = parse(parsing_date, date_formats=["%Y%m%d"]).date()
            url = box.xpath(links_xpath).extract_first()
            url = url.replace("previsualizar", "baixar")
            yield Gazette(
                date=parsing_date,
                file_urls=[url],
                is_extra_edition=False,
                power="executive_legislative",
            )

        Extracts the gazette items from the web page.
        
Extracts the gazette items from the web page.
Extracts the gazette items from the web page .
def parse(self, response):
        boxes = response.css(".box-diario")
        links_xpath = './/a[text()[normalize-space(.) = "Visualizar Diário"]]/@href'
        for box in boxes:
            parsing_date = box.re(r"diario-(\d{8})")[0]
            parsing_date = parse(parsing_date, date_formats=["%Y%m%d"]).date()
            url = box.xpath(links_xpath).extract_first()
            url = url.replace("previsualizar", "baixar")
            yield Gazette(
                date=parsing_date,
                file_urls=[url],
                is_extra_edition=False,
                power="executive_legislative",
            )
def parse ( self , response ) : boxes = response . css ( ".box-diario" ) links_xpath = './/a[text()[normalize-space(.) = "Visualizar Diário"]]/@href' for box in boxes : parsing_date = box . re ( r"diario-(\d{8})" ) [ 0 ] parsing_date = parse ( parsing_date , date_formats = [ "%Y%m%d" ] ) . date ( ) url = box . xpath ( links_xpath ) . extract_first ( ) url = url . replace ( "previsualizar" , "baixar" ) yield Gazette ( date = parsing_date , file_urls = [ url ] , is_extra_edition = False , power = "executive_legislative" , )
Extracts the gazette items from the web page.
Extracts the gazette items from the web page .
"""
        Extracts the gazette items from the web page.
        """
self
response