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

including reviews with app details #28

Merged
merged 4 commits into from
Apr 8, 2023
Merged

Conversation

IzzySoft
Copy link
Contributor

@IzzySoft IzzySoft commented Apr 1, 2023

As they are part of the page and don't need a separate request, I've left them with the app details. Might be incomplete, though: I've noticed when browsing them at Play, it seems to have loaded more via XHR all the while. For the example you've specified in #27 it has 40 reviews included. If that's not enough and there are more, we could take a look at that for a separate method later. This one at least gets you started 😄

So can you please test it out and give your opinion, @BaseMax?

@BaseMax
Copy link
Owner

BaseMax commented Apr 1, 2023

Thank you so much. It's still in draft mode yes?

As they are part of the page and don't need a separate request, I've left them with the app details. Might be incomplete, though: I've noticed when browsing them at Play, it seems to have loaded more via XHR all the while. For the example you've specified in #27 it has 40 reviews included. If that's not enough and there are more, we could take a look at that for a separate method later. This one at least gets you started 😄

Yes Nice idea. It's good to get the first reviews from a single-page application page with a single request.

But note what I mentioned in the issue is about getting all reviews. We need to check and explore the XHR requests of Google which look are not raw JSON.

@IzzySoft
Copy link
Contributor Author

IzzySoft commented Apr 1, 2023

Thank you so much. It's still in draft mode yes?

Yes, I'd like to at least clean up some namings, as indicated in the issue.

Yes Nice idea. It's good to get the first reviews from a single-page application page with a single request.

Not only that; the data was already transferred, so why not use it?

But note what I mentioned in the issue is about getting all reviews. We need to check and explore the XHR requests of Google which look are not raw JSON.

Yes, I remember. I left some notes about that in #27 (not here, as that would be a separate task, maybe for another PR). And no, it's not "raw JSON", it's rather ProtoBuf. I just take the "lazy approach" converting it to JSON, as other scrapers do as well. One reason is keeping dependencies low (not having to include some ProtoBuf lib), another is that ProtoBuf consists of 2 parts where we only have one of: data we have, definition is missing (proprietary).

So here's the path I'd suggest:

  • I now adjust the field names as suggested in the issue
  • next, I'd need to find an example where reviews have answers, to fill that gap
  • then some testing, where I'd need to ask you for as I have no proper "real-life use cases" – while you have or you wouldn't have asked for
  • once you approve, this PR can be merged – and we can go for the second part.

@IzzySoft
Copy link
Contributor Author

IzzySoft commented Apr 1, 2023

OK, got the responses in, too, if there are any – so it's ready for your testing, @BaseMax (candidate with responses, to get an idea what to look for: com.irobot.home). Feel free to mark it ready-for-review, as that's basically what your testing task will be 🤣 Once merged, we shall not forget to update the documentation.

Oh, btw, as the commit message says I also included the token for fetching more reviews. Might come in handy if you already have the app data and want to append. Or maybe it's even needed to fetch any reviews at all if that process cannot work completely separate (so one would need to fetch appData first, then continue from there).

@BaseMax BaseMax marked this pull request as ready for review April 1, 2023 19:35
@BaseMax
Copy link
Owner

BaseMax commented Apr 8, 2023

Thanks.
Good, we can merge it. but we need to fetch and get all reviews.

@BaseMax BaseMax merged commit eb0ddc7 into BaseMax:main Apr 8, 2023
@IzzySoft
Copy link
Contributor Author

IzzySoft commented Apr 8, 2023

Good, we can merge it. but we need to fetch and get all reviews.

Yes, full ack. This here just implements the easy-to-get-at part in a place we're parsing already anyway. The original issue is still open (and assigned to me) – I hope to find some time to implement the additional method some day (feel free to send me a reminder every now and then; my current task-queue is quite full and I need to prioritize; also I guess the new issue about not getting versions for some apps is more important, right? For that, too, I'll see when I can get to it).

Thanks for merging!

@IzzySoft IzzySoft deleted the playreviews branch April 8, 2023 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants