Skip to content
This repository was archived by the owner on Nov 18, 2019. It is now read-only.

Feature/keyword rank #4

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

tegkhanna
Copy link

added keyword rank(when searched in playstore) for entered query. Feature often needed by developers for search optimization.
Needed the feature for myself so I thought why not to push it to the original repo as well!

@tegkhanna tegkhanna closed this Feb 24, 2018
@tegkhanna
Copy link
Author

Bad testing!

@tegkhanna tegkhanna reopened this Feb 25, 2018
Copy link
Member

@apoorvaeternity apoorvaeternity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tegkhanna Thanks!
This is a good addition.
Please make the required changes.

i = 1
rank = 1
try:
while(i < 500):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not keep it as i<=100 and increment i by 1?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docid set has the same docid reoccurring 5 times.. that's why incrementing the count by 5. Multiplying was somehow offsetting the result. Will look into this though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay.

rank = rank + 1
except:
return 0
return 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's return None instead of 0.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shall be done!

@@ -111,3 +112,27 @@ def title(self):
selector = CSSSelector('.id-app-title')
match = self.tree.xpath(selector.path)
return match[0].text

def keyword_rank(self, search):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move this to a new file playstat.py just like appstat.py because this is not related to a particular app but is a general stat.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, as a seperate research tool i guess! Optimisation websites offer this simple function for over 50$/month !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants