Giter Club home page Giter Club logo

Comments (18)

mnm1992 avatar mnm1992 commented on June 12, 2024 2

And the postman call, that should help, just press end after importing this
iTunes.postman_collection.zip

from app-store-scraper.

christian-fei avatar christian-fei commented on June 12, 2024 2

@facundoolano I am working on a .ratings method to add to the public API.

The method .ratings fetches the histogram and total number of ratings from the /customer-reviews endpoint like @tdunham02 suggested. It works like a charm (also by appId like in .similar).

I was thinking, to keep app-store-scraper and google-play-scraper aligned, it would be nice to include the information about the histogram in the .app method (either by default or by providing a parameter to .app), along these lines:

var store = require('app-store-scraper');

store.app({id: 553834731}).then(console.log).catch(console.log);

// or

store.app({id: 553834731, ratings: true}).then(console.log).catch(console.log);

Results:

{ id: 553834731,
  appId: 'com.midasplayer.apps.candycrushsaga',
  title: 'Candy Crush Saga',
  currentVersionScore: 4.5,
  histogram: { '1': 14, '2': 11, '3': 26, '4': 51, '5': 284 },
  ratings: 386,
  ...
}

The interesting part is that it works out of the box with the country parameter that .app accepts.

Let me know if it makes sense and have any suggestions.

Cheers,

from app-store-scraper.

facundoolano avatar facundoolano commented on June 12, 2024

Sounds interesting, but I can't seem to make it work:

 curl -XGET "http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=1091944550&pageNumber=0&sortOrdering=2&type=Purple+Software" -A "iTunes/9.1.1" -H "X-Apple-Store-Front: 143441-1"

Can you show an example url to get with curl (or tell me what client you used to test it). Also it would be useful if you show an example response.

from app-store-scraper.

mnm1992 avatar mnm1992 commented on June 12, 2024

https://github.com/mnm1992/review-fetcher/blob/master/fetcher/iosRatingScraper.js full js code sample :)

from app-store-scraper.

mnm1992 avatar mnm1992 commented on June 12, 2024

And an article explaining howto do it in curl: https://innumero.wordpress.com/2011/02/08/scraping-the-apple-app-store/

from app-store-scraper.

facundoolano avatar facundoolano commented on June 12, 2024

Still no luck, this prompts for a password, and sending an empty one as your link suggests doesn't work either.

curl -H "Host: itunes.apple.com" -H "Accept-Language: en-us, en;q=0.50" -H "X-Apple-Store-Front: 143444,5" -H "X-Apple-Tz: 3600" -U "iTunes/9.1.1" "http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=1091944550&pageNumber=0&sortOrdering=2&type=Purple+Software";

I've tried several combinations, please provide me with a command that I can paste as is to get the results.

from app-store-scraper.

mnm1992 avatar mnm1992 commented on June 12, 2024

Weird it does work in postman(A chrome extension) and my js app(See link above).

from app-store-scraper.

mnm1992 avatar mnm1992 commented on June 12, 2024

https://pastebin.com/NGxW3YPF
Is the output of the call, Some nice xml based webobjects.

from app-store-scraper.

facundoolano avatar facundoolano commented on June 12, 2024

Postman doesn't work because it doesn't allow you to override the user agent.

from app-store-scraper.

mnm1992 avatar mnm1992 commented on June 12, 2024

It does, that's where I copy pasted the pastebin output from. It gives a warning yes, and then does it anyway

from app-store-scraper.

mnm1992 avatar mnm1992 commented on June 12, 2024

Btw I tried on windows and osx, mabye postman can't do useragent magic on linux

from app-store-scraper.

mnm1992 avatar mnm1992 commented on June 12, 2024

Update on this, since the old way mentioned here no longer works.
If you want to integrate this feature in the future an example is here: https://www.npmjs.com/package/iosratingfetcher.

from app-store-scraper.

tdunham02 avatar tdunham02 commented on June 12, 2024

Here is the endpoint:

https://itunes.apple.com/us/customer-reviews/id529479190?dataOnly=true&displayable-kind=11

Using an iTunes user agent, it returns:

{ "adamId": 529479190, "clickToRateUrl": "https:\/\/userpub.itunes.apple.com\/WebObjects\/MZUserPublishing.woa\/wa\/userRateContent?displayable-kind=11&id=529479190", "writeUserReviewUrl": "https:\/\/userpub.itunes.apple.com\/WebObjects\/MZUserPublishing.woa\/wa\/writeUserReview?cc=us&displayable-kind=11&id=529479190", "totalNumberOfReviews": 368921, "userReviewsRowUrl": "https:\/\/itunes.apple.com\/WebObjects\/MZStore.woa\/wa\/userReviewsRow", "userReviewsSortOptions": [ { "sortId": 1, "name": "Most Helpful" }, { "sortId": 2, "name": "Most Favorable" }, { "sortId": 3, "name": "Most Critical" }, { "sortId": 4, "name": "Most Recent" } ], "kindId": 11, "kindExtId": "iosSoftware", "kindName": "software", "saveUserReviewUrl": "https:\/\/userpub.itunes.apple.com\/WebObjects\/MZUserPublishing.woa\/wa\/saveUserReview?displayable-kind=11", "ariaLabelForRatings": "4 and a half stars", "ratingCount": 2810478, "ratingCountList": [ 112419, 60634, 114882, 284207, 2238336 ], "ratingAverage": 4.5, "currentVersion": { "ariaLabelForRatings": "4 and a half stars", "ratingCount": 675780, "ratingCountList": [ 16736, 7007, 17914, 51612, 582511 ], "ratingAverage": 4.5 } }

from app-store-scraper.

facundoolano avatar facundoolano commented on June 12, 2024

I'm ok with that as long as the ratings request/parsing doesn't happen by default (when not explicitly requested).

from app-store-scraper.

christian-fei avatar christian-fei commented on June 12, 2024

@facundoolano awesome!

will get back to you once ready and PR this stuff 🚀

Great work, life-saving :)

from app-store-scraper.

christian-fei avatar christian-fei commented on June 12, 2024

PR here: #94

from app-store-scraper.

christian-fei avatar christian-fei commented on June 12, 2024

@facundoolano can we close this now?

from app-store-scraper.

christian-fei avatar christian-fei commented on June 12, 2024

Thank you, it was a creative discussion and pleasant PR 🤝

from app-store-scraper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.