data_collection/gazette/spiders/base/sigpub.py
def parse_calendar(self, response):
        """Makes requests for each date to see if a document is available."""
        default_form_fields = {
            "calendar[_token]": response.xpath(
                "//input[@id='calendar__token']/@value"
            ).get()
        }
        for gazette_date, date_form_fields in self.available_dates_form_fields():
            formdata = {**default_form_fields, **date_form_fields}

            yield scrapy.FormRequest(
                url=response.urljoin("materia/calendario"),
                formdata=formdata,
                meta={"date": gazette_date, "edition_type": "regular"},
                callback=self.parse_gazette_info,
            )
            yield scrapy.FormRequest(
                url=response.urljoin("materia/calendario/extra"),
                formdata=formdata,
                meta={"date": gazette_date, "edition_type": "extra"},
                callback=self.parse_gazette_info,
            )
Makes requests for each date to see if a document is available.
Makes requests for each date to see if a document is available.
Makes requests for each date to see if a document is available .
def parse_calendar(self, response):
        default_form_fields = {
            "calendar[_token]": response.xpath(
                "//input[@id='calendar__token']/@value"
            ).get()
        }
        for gazette_date, date_form_fields in self.available_dates_form_fields():
            formdata = {**default_form_fields, **date_form_fields}
            yield scrapy.FormRequest(
                url=response.urljoin("materia/calendario"),
                formdata=formdata,
                meta={"date": gazette_date, "edition_type": "regular"},
                callback=self.parse_gazette_info,
            )
            yield scrapy.FormRequest(
                url=response.urljoin("materia/calendario/extra"),
                formdata=formdata,
                meta={"date": gazette_date, "edition_type": "extra"},
                callback=self.parse_gazette_info,
            )
def parse_calendar ( self , response ) : default_form_fields = { "calendar[_token]" : response . xpath ( "//input[@id='calendar__token']/@value" ) . get ( ) } for gazette_date , date_form_fields in self . available_dates_form_fields ( ) : formdata = { ** default_form_fields , ** date_form_fields } yield scrapy . FormRequest ( url = response . urljoin ( "materia/calendario" ) , formdata = formdata , meta = { "date" : gazette_date , "edition_type" : "regular" } , callback = self . parse_gazette_info , ) yield scrapy . FormRequest ( url = response . urljoin ( "materia/calendario/extra" ) , formdata = formdata , meta = { "date" : gazette_date , "edition_type" : "extra" } , callback = self . parse_gazette_info , )
Makes requests for each date to see if a document is available.
Makes requests for each date to see if a document is available .
"""Makes requests for each date to see if a document is available."""
self
response