Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[new] get_appstore_data(url) #18

Open
unytics opened this issue Dec 6, 2022 · 3 comments
Open

[new] get_appstore_data(url) #18

unytics opened this issue Dec 6, 2022 · 3 comments
Labels
new-bigfunction Suggest a New BigFunction

Comments

@unytics
Copy link
Owner

unytics commented Dec 6, 2022

No description provided.

@unytics unytics added the new-bigfunction Suggest a New BigFunction label Dec 6, 2022
@unytics unytics changed the title load_appstore_rating(url) load_appstore_rating(url) Dec 6, 2022
@unytics unytics changed the title load_appstore_rating(url) [new] load_appstore_rating(url) Dec 7, 2022
@unytics
Copy link
Owner Author

unytics commented Dec 20, 2022

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 unytics changed the title [new] load_appstore_rating(url) [new] get_appstore_data(url) Dec 20, 2022
@unytics
Copy link
Owner Author

unytics commented Dec 20, 2022

Tester pour:

  • appstore
  • playstore
  • truspilot
  • linkedin_company_profile
  • twitter

@shivam221098
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-bigfunction Suggest a New BigFunction
Projects
None yet
Development

No branches or pull requests

2 participants