xebia-functional / nine-cards-v2

An Open Source Android Launcher built with Scala on Android
http://www.9cards.io/
Other
183 stars 20 forks source link

Complete information from Web Scraper #508

Closed diesalbla closed 8 years ago

diesalbla commented 8 years ago

The GooglePlay subsystem obtains the data for the cards from two sources. One of these is the Web Scraper, which fetches web pages from the Play Store, such as this one, and extracts from the html document the information for the card. To analyse the html documents, it uses the standard scala XML library.

The goal of this ticket is to extend the implementation, contained in the object GooglePlayPageParser, to provide all the information needed for the answers of the endpoint created in ticket #507:

Note that this ticket is only concerned with the AppCard objects created in ticket #507.

noelmarkham commented 8 years ago

Just be aware this uses more than the standard Scala XML implementation - it uses TagSoup for making sense of HTML - https://github.com/47deg/nine-cards-backend-google-play/blob/ac94a315cefcf810c4a4b50a2609cbb776ce6220/src/main/scala/com/fortysevendeg/ninecards/googleplay/service/free/interpreter/Converters.scala#L4

diesalbla commented 8 years ago

Here is the PR for this ticket.

diesalbla commented 8 years ago

These are the instructions for performing the QA. Done on a Ubuntu machine

For the tests, we use the endpoint to get one app card, GET http://localhost:8081/googleplay/cards/{packageName}. Using the client curl, a full request for the Youtube App would be like the following one:

 curl -H "X-Google-Play-Token: token"\
               -H "X-Android-ID: androidId"\
               -H "X-Android-Market-Localization: en-US"\
              "http://localhost:8081/googleplay/cards/com.google.android.youtube"

The QA should compare this with the information shown in a web browser by the web page of Google Play, such as [https://play.google.com/store/apps/details?id=com.google.android.youtube&hl=en-US].

The QA should perform this request on several packages, and for each of them it should check the following:

In order to make this exhaustive enough, the QA should try at least a non-free app, such as com.mojang.minecraftpe.

franciscodr commented 8 years ago

QA passed successfully. Good job!!

franciscodr commented 8 years ago

You should close the PR https://github.com/47deg/nine-cards-backend-google-play/pull/12 because it was created against a branch that has been already merged into master