Socket
Socket
Sign inDemoInstall

@grodno-city/grodno-gov-renting-scraper

Package Overview
Dependencies
67
Maintainers
4
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @grodno-city/grodno-gov-renting-scraper

Scrap premises rented by Grodno government


Version published
Weekly downloads
1
decreased by-50%
Maintainers
4
Install size
8.22 MB
Created
Weekly downloads
 

Readme

Source

Scrap premises rented by Grodno government

Build Status

Scraper make requests to http://grodno.gov.by/ru/main.aspx?guid=7101

Install

yarn add @grodno-city/grodno-gov-renting-scraper

or

npm install --save @grodno-city/grodno-gov-renting-scraper

Usage

const { extract } = require('@grodno-city/grodno-gov-renting-scraper')

const run = async () => {
  const result = await extract()
  console.log(result)
}

run()

Provided result has "premises by organization" format, so it will something like:

[
  {
    name: 'Унитарное жилищное ремонтно-эксплуатационное предприятие Ленинского района',
    premises: [
      ...
      {
        address: 'ул. Академическая, 14',
        description: 'Нежилое изолированное помещение, на 1,2 этаже здания.',
        areas: '50,82; 39.0; 34.86;30.1; 14.4',
        appointment: 'офис, оказание услуг',
        contact: '43-04-47'
      }
      ...
    ]
  }
]

Enhancers

Enhancers can transform specific fields to machine-readable format

areaEnhancer

Transfrom areas field to array of numbers or objects

const { extract, enhancers } = require('@grodno-city/grodno-gov-renting-scraper')
const { areaEnhancer } = enhancers

const run = async () => {
  const result = await extract()
  result.forEach(organization => {
    organization.premises.forEach(premise => {
      const enhancedAddress = areaEnhancer(premise.areas)
      console.log(enhancedAddress)
    })
  })
}

run()

Areas array can contains a numbers or an objects:

  areas: [12, 50, {
    apartmentNumber: '24',
    area: '44.4'
  }]

Api

  • extract() - request and parse data
  • parse(rawText: String) - parse passed string
  • requestRawData() - request and return string
  • License

    Under MIT license

FAQs

Last updated on 05 Jul 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc