def getLOMTechnical(self, response):
     technical = LomBase.getLOMTechnical(self, response)
     technical.replace_value("format", "text/html")
     technical.replace_value(
         "location", self.get("acf.url", json=response.meta["item"])
     )
     return technical
Пример #2
0
 def getLOMTechnical(self, response):
     technical = LomBase.getLOMTechnical(self, response)
     technical.add_value("format", "text/html")
     technical.add_value(
         "location",
         response.meta["item"].xpath("url_datensatz//text()").get())
     return technical
    def getLOMTechnical(self, response):
        technical = LomBase.getLOMTechnical(self, response)

        technical.add_value("format", "text/html")
        technical.add_value("location", self.getUri(response))
        technical.add_value("size", len(response.body))

        return technical
Пример #4
0
 def getLOMTechnical(self, response):
     technical = LomBase.getLOMTechnical(self, response)
     technical.replace_value("format", "text/html")
     technical.replace_value(
         "location",
         self.entryUrl.replace(
             "%page", self.get("parse.title", json=response.meta["item"])),
     )
     return technical
Пример #5
0
    def getLOMTechnical(self, response):
        technical = LomBase.getLOMTechnical(self, response)

        technical.add_value('format', 'application/xml')
        location = response.xpath('/data/media_url/text()').get()
        technical.add_value('location', "http://merlin.nibis.de" + location)
        technical.add_value('size', len(response.body))

        return technical
Пример #6
0
 def getLOMTechnical(self, response):
     technical = LomBase.getLOMTechnical(self, response)
     #technical.add_value('format', item.xpath('enclosure/@type').get())
     #technical.add_value('size', item.xpath('enclosure/@length').get())
     #technical.add_value('location', item.xpath('enclosure/@url').get())
     technical.add_value('format', 'text/html')
     technical.add_value('location',
                         response.meta['item'].xpath('link//text()').get())
     return technical
Пример #7
0
 def getLOMTechnical(self,
                     response: Response) -> items.LomTechnicalItemLoader:
     technical = LomBase.getLOMTechnical(self, response)
     technical.add_value("format", "text/html")
     technical.add_value("location",
                         YoutubeSpider.get_video_url(response.meta["item"]))
     technical.add_value(
         "duration", response.meta["item"]["contentDetails"]["duration"])
     return technical
Пример #8
0
 def getLOMTechnical(self, response):
     technical = LomBase.getLOMTechnical(self, response)
     technical.add_value("format", self.getLRMI("fileFormat", response=response))
     technical.add_value("size", self.getLRMI("ContentSize", response=response))
     url = self.getLRMI("url", response=response)
     if not url:
         url = response.url
     technical.add_value("location", url)
     return technical
Пример #9
0
 def getLOMTechnical(self, response):
     technical = LomBase.getLOMTechnical(self, response)
     # technical.add_value('format', item.xpath('enclosure/@type').get())
     # technical.add_value('size', item.xpath('enclosure/@length').get())
     # technical.add_value('location', item.xpath('enclosure/@url').get())
     technical.add_value("format", "text/html")
     technical.add_value(
         "location", response.meta["item"].xpath("link//text()").get()
     )
     return technical
Пример #10
0
 def getLOMTechnical(self, response):
     technical = LomBase.getLOMTechnical(self, response)
     technical.add_value('format',
                         self.getLRMI('fileFormat', response=response))
     technical.add_value('size',
                         self.getLRMI('ContentSize', response=response))
     url = self.getLRMI('url', response=response)
     if not url:
         url = response.url
     technical.add_value('location', url)
     return technical
Пример #11
0
    def getLOMTechnical(self, response):
        response.selector.remove_namespaces()
        record = response.xpath('//OAI-PMH/GetRecord/record')

        technical = LomBase.getLOMTechnical(response)
        technical.add_value(
            'format',
            record.xpath(
                'metadata/lom/technical/format//text()').extract_first())
        technical.add_value(
            'size',
            record.xpath(
                'metadata/lom/technical/size//text()').extract_first())
        technical.add_value(
            'location',
            record.xpath(
                'metadata/lom/technical/location//text()').extract_first())
        return technical
Пример #12
0
    def getLOMTechnical(self, response):
        response.selector.remove_namespaces()
        record = response.xpath("//OAI-PMH/GetRecord/record")

        technical = LomBase.getLOMTechnical(response)
        technicalEntries = record.xpath("metadata/lom/technical")
        found = False
        for entry in technicalEntries:
            format = entry.xpath("format//text()").extract_first()
            if format == "text/html":
                found = True
                technical.add_value(
                    "format",
                    entry.xpath("format//text()").extract_first())
                technical.add_value(
                    "size",
                    entry.xpath("size//text()").extract_first())
                technical.add_value(
                    "location",
                    entry.xpath("location//text()").extract_first())
        if not found:
            technical.add_value(
                "format",
                record.xpath(
                    "metadata/lom/technical/format//text()").extract_first(),
            )
            technical.add_value(
                "size",
                record.xpath(
                    "metadata/lom/technical/size//text()").extract_first(),
            )
            technical.add_value(
                "location",
                record.xpath(
                    "metadata/lom/technical/location//text()").extract_first(),
            )
        return technical
Пример #13
0
 def getLOMTechnical(self,
                     response: Response) -> items.LomTechnicalItemLoader:
     technical = LomBase.getLOMTechnical(self, response)
     technical.add_value("format", self.static_values["format"])
     technical.add_value("location", response.meta["row"]["url"])
     return technical
Пример #14
0
 def getLOMTechnical(self, response):
   technical = LomBase.getLOMTechnical(self, response)
   technical.add_value('location', response.url)
   technical.add_value('format', 'text/html')
   technical.add_value('size', len(response.body))
   return technical
Пример #15
0
 def getLOMTechnical(self, response):
     technical = LomBase.getLOMTechnical(self, response)
     technical.add_value("format", "text/html")
     technical.add_value("location", response.url)
     return technical
Пример #16
0
 def getLOMTechnical(self, response):
     technical = LomBase.getLOMTechnical(self, response)
     technical.add_value("location",
                         response.meta["row"][CSVBase.COLUMN_URL]["text"])
     technical.add_value("format", "text/html")
     return technical
Пример #17
0
 def getLOMTechnical(self, response):
   technical = LomBase.getLOMTechnical(self, response)
   technical.add_value('format', 'text/html')
   technical.add_value('location', response.meta['item'].xpath('url_datensatz//text()').get())
   return technical
 def getLOMTechnical(self, response):
     technical = LomBase.getLOMTechnical(self, response)
     technical.add_value("format", self.get("fileFormat", response=response))
     technical.add_value("size", self.get("ContentSize", response=response))
     technical.add_value("location", response.meta["url"])
     return technical
Пример #19
0
 def getLOMTechnical(self, response):
     technical = LomBase.getLOMTechnical(self, response)
     technical.replace_value('format', 'text/html')
     technical.replace_value(
         'location', self.get('acf.url', json=response.meta['item']))
     return technical
Пример #20
0
 def getLOMTechnical(self, response):
   technical = LomBase.getLOMTechnical(self, response)
   technical.add_value('format', self.get('fileFormat', response = response))
   technical.add_value('size', self.get('ContentSize', response = response))
   technical.add_value('location', response.meta['url'])
   return technical