bigfunctions icon indicating copy to clipboard operation
bigfunctions copied to clipboard

[new] `get_appstore_data(url)`

Open unytics opened this issue 3 years ago • 3 comments

unytics avatar Dec 06 '22 22:12 unytics

with content as (
  select bigfunctions.eu.get('https://play.google.com/store/apps/details?id=com.fpe.comptenickel&hl=en&gl=US', null) as text
)

select 
  to_json_string(
    struct(
      cast(regexp_extract(text, r'Rated (\d\.\d) stars out of five stars') as float64) as rating,
      ifnull(
        ifnull(
          cast(1000000 * cast(regexp_extract(text, r'(\d+\.\d)M reviews') as float64) as int64),
          cast(1000 * cast(regexp_extract(text, r'(\d+\.\d)K reviews') as float64) as int64)
        ),
        cast(regexp_extract(text, r'(\d+\.\d) reviews') as int64)
       ) as nb_reviews
    )
  ) as infos
from content

unytics avatar Dec 20 '22 13:12 unytics

Tester pour:

  • appstore
  • playstore
  • truspilot
  • linkedin_company_profile
  • twitter

unytics avatar Dec 20 '22 13:12 unytics

Hi 👋,

Is that function can be made more dynamic for Playstore or Appstore? i.e. It's not a good idea to pass in URLs of apps to get the count of reviews, ratings, etc. Someone still has to get the URL of the app's page first then only he can use it in the functions calls. If someone can get the URL then he can also get the review and rating from the page and use it for their purpose.

What if

  1. It can be made for two types of inputs a. If an input is a type of URL (use regex to check) then use your query. b. If an input is a type of non-URL then search for that phrase on Appstore or Playstore.
  2. For non-URL types we can search for that phrase on the official Playstore or Appstore and extract reviews and ratings from the top matched result.

shivam221098 avatar Apr 01 '23 05:04 shivam221098