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

What's new / "recent_changes" returns None #32

Closed
ayush-mandowara-bst opened this issue Jan 29, 2019 · 2 comments
Closed

What's new / "recent_changes" returns None #32

ayush-mandowara-bst opened this issue Jan 29, 2019 · 2 comments
Labels

Comments

@ayush-mandowara-bst
Copy link
Contributor

ayush-mandowara-bst commented Jan 29, 2019

Describe the bug
What's New / "recent_changes" returns None even though it exists.

To Reproduce

import play_scraper as ps

data = ps.details('com.supercell.clashofclans')
print(data['recent_changes'])

Expected behavior
Should return the value for 'what's new' when it exists.

Screenshots
Not required

Desktop (please complete the following information):

  • OS: [Windows 10]
  • Python Version [3.7.2]
  • play_scraper Version [0.5.2]

Additional context
Issue can be resolved by changing code to
recent_changes = changes_soup.text

@ayush-mandowara-bst ayush-mandowara-bst changed the title What What's new / Jan 29, 2019
@ayush-mandowara-bst ayush-mandowara-bst changed the title What's new / What's new / "recent_changes" returns None Jan 29, 2019
@ayush-mandowara-bst
Copy link
Contributor Author

try:
    changes_soup = soup.select('div[itemprop="description"] content')[1]
    recent_changes = '\n'.join([x.string.strip() for x in changes_soup])
except (IndexError, AttributeError):
    recent_changes = None

^ from utils.py
It fails for many apps for example: com.supercell.clashofclans & com.instagram.zara

Fix: Change
recent_changes = '\n'.join([x.string.strip() for x in changes_soup])
to
recent_changes = changes_soup.text

@danieliu
Copy link
Owner

danieliu commented Mar 2, 2019

Fixed by #33

@danieliu danieliu closed this as completed Mar 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants