DevGang
ΠΠ²Ρ‚ΠΎΡ€ΠΈΠ·ΠΎΠ²Π°Ρ‚ΡŒΡΡ

πŸš€ API для получСния ΠΈΠ½Ρ„ΠΎΡ€ΠΌΠ°Ρ†ΠΈΠΈ ΠΎ прилоТСниях Π² PlayStore

НСдавно ΠΌΠ½Π΅ Π±Ρ‹Π»ΠΎ интСрСсно, Π΅ΡΡ‚ΡŒ Π»ΠΈ способ ΠΎΡ‡ΠΈΡΡ‚ΠΈΡ‚ΡŒ Π΄Π°Π½Π½Ρ‹Π΅ ΠΈΠ· элСмСнтов HTML DOM с ΠΏΠΎΠΌΠΎΡ‰ΡŒΡŽ node ΠΈ всСх Π΄Ρ€ΡƒΠ³ΠΈΡ… собствСнных Ρ„ΡƒΠ½ΠΊΡ†ΠΈΠΉ javascript, Ρ‚Π°ΠΊΠΈΡ… ΠΊΠ°ΠΊ getElementByClassName, innerText ΠΈ Ρ‚Π°ΠΊ Π΄Π°Π»Π΅Π΅. ΠŸΠΎΡΠ»Π΅ большого количСства поисков я наткнулся Π½Π° JSDOM.

Π—Π°Ρ‚Π΅ΠΌ я Π½Π°Ρ‡Π°Π» Π΅Π³ΠΎ ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚ΡŒ ΠΈ нашСл это Π²ΠΏΠ΅Ρ‡Π°Ρ‚Π»ΡΡŽΡ‰ΠΈΠΌ. ΠŸΠΎΡΡ‚ΠΎΠΌΡƒ я написал скрипт для извлСчСния Π΄Π΅Ρ‚Π°Π»Π΅ΠΉ прилоТСния для Android ΠΈΠ· Google Play Store Π² Ρ€Π΅ΠΆΠΈΠΌΠ΅ Ρ€Π΅Π°Π»ΡŒΠ½ΠΎΠ³ΠΎ Π²Ρ€Π΅ΠΌΠ΅Π½ΠΈ ΠΈ получСния Π½Π΅ΠΎΠ±Ρ…ΠΎΠ΄ΠΈΠΌΠΎΠΉ ΠΈΠ½Ρ„ΠΎΡ€ΠΌΠ°Ρ†ΠΈΠΈ Π² Ρ…ΠΎΡ€ΠΎΡˆΠΎ ΠΎΡ‚Ρ„ΠΎΡ€ΠΌΠ°Ρ‚ΠΈΡ€ΠΎΠ²Π°Π½Π½ΠΎΠΌ Π²ΠΈΠ΄Π΅.

Π‘ΠΎΠ»Π΅Π΅ Ρ‚ΠΎΠ³ΠΎ, послС создания скрипта ΠΏΡ€Π΅ΠΎΠ±Ρ€Π°Π·ΠΎΠ²Π°Π» Π΅Π³ΠΎ Π² NPM Package ΠΈ Express Rest API.

Установка:

npm install playstore-app-info 

ИспользованиС:

const play_app_info = require('playstore-app-info')

play_app_info("com.kakarooms").then(result=>{
    console.log("result", result)
})

Π‘Ρ…Π΅ΠΌΠ° ΠΎΡ‚Π²Π΅Ρ‚Π°

{
  id: 'com.kakarooms',
  logo: 'https://play-lh.googleusercontent.com/oSPuaaIkM7M-4mfkQJzc1CzaJWep4465CIPft5ObwNI9P-AMNLUNLzD0rQy_ttQLeh9T=s180',
  app_name: 'Mr Room: Search Hostels, PG and Flats πŸƒπŸ» Easily',
  app_url: 'https://play.google.com/store/apps/details?id=com.kakarooms',
  category: 'House & Home',
  contains_ads: true,
  publisher_account_url: 'https://play.google.com/store/apps/developer?id=MrRoom',
  publisher_name: 'MrRoom',
  preview_images: [
    'https://play-lh.googleusercontent.com/e5Mocy26xhvC8NZyoPr_Tikk1QOWEkLpFXwoR4-mveUmgG_mdOA-Pbk5rjSMxu0dPQ=w720-h310',
    'https://play-lh.googleusercontent.com/upzECkks147uQl1pT4d5ughZrRGtNolVUN3TkCv98RyK-whEoL1hFhJX_9O_edham7rx=w720-h310'
  ],
  youtube_trailer: 'N/A',
  description: "Are you in the hunt for Hostels, PG or Flats and want it without Brokerage fee, then you have landed on the correct way. Do you know, every year 10 million students migrate to a new city and they face the same problem They miss their home and want a comfortable place to live. But what they eventually get after all their efforts are sub-standard rooms and facilities. 😏 Don't worry if you are moving to a new city for education. Because MrRoom is here.😎So what do we do?We help students in searching for affordable rooms close to their desired location. 🀩We have a wide variety of verified hostels and pgs registered on our platform and most importantly, we charge zero brokerage. Our platform offers Filters to customize the Search Results and can check Room Availability from anywhere anytime. We also give tenants πŸ’ƒ πŸ•Ίthe facilities to manage their monthly rent online. There will be complete transparency between the owners and tenants. So, a standard one-stop solution for students who want to focus more on studies rather than wasting time in finding the necessary facilities. You can search for 100+ rental rooms(Hostels, Pg and Flats) according to your desired choice. 🀟Finding accommodation was never so easy. Just book your room through our app and that too without paying any brokerage fee. So, search and book through our MrRoom No Brokerage app which provides you with hassle-free stay options.",
  application_meta_data: {
    updated: 'September 19, 2020',
    size: '12M',
    installs: '1,000+',
    current_version: '2.1.3',
    requires_android: '4.4 and up',
    content_rating: 'Rated for 3+Learn more',
    permissionsview_details: '',
    reportflag_as_inappropriate: 'N/A',
    offered_by: 'MrRoom',
    developer: {
      app_developer_website: 'https://www.mrroom.in/',
      app_developer_email: 'mailto:mrroomindia@gmail.com',
      app_developer_policy: 'https://www.mrroom.in/policy',
      app_developer_address: 'N/A'
    }
  },
  latest_update_description: 'Better User Interface and User InteractionSocial Authentication AddedCoaching Category AddedMess Category AddedLaundry Category AddedReview System AddedSearch System EnhancedAdd a ListingSubmit RequirementImprove ListingRaise a Ticket Option Added',
  ratings_data: {
    ratings: '4.3',
    ratings_distribution: [ [Object], [Object], [Object], [Object], [Object] ]
  }
}
#JavaScript #NodeJS
ΠšΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠΈ
Π§Ρ‚ΠΎΠ±Ρ‹ ΠΎΡΡ‚Π°Π²ΠΈΡ‚ΡŒ ΠΊΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠΉ, Π½Π΅ΠΎΠ±Ρ…ΠΎΠ΄ΠΈΠΌΠΎ Π°Π²Ρ‚ΠΎΡ€ΠΈΠ·ΠΎΠ²Π°Ρ‚ΡŒΡΡ

ΠŸΡ€ΠΈΡΠΎΠ΅Π΄ΠΈΠ½ΡΠΉΡΡ Π² тусовку

Π’ этом мСстС ΠΌΠΎΠ³Π»Π° Π±Ρ‹ Π±Ρ‹Ρ‚ΡŒ ваша Ρ€Π΅ΠΊΠ»Π°ΠΌΠ°

Π Π°Π·ΠΌΠ΅ΡΡ‚ΠΈΡ‚ΡŒ Ρ€Π΅ΠΊΠ»Π°ΠΌΡƒ