I'm trying to scrape Android Store pages with Beautiful Soup in order to have a file that contains a list of packages. Here is my code :
from requests import get
from bs4 import BeautifulSoup
import json
import time
url = 'https://play.google.com/store/apps/collection/topselling_free'
response = get(url)
html_soup = BeautifulSoup(response.text, 'html.parser')
type(html_soup)
app_container = html_soup.find_all('div', class_="card no-rationale
square-cover apps small")
file = open("applications.txt","w+")
for i in range(0,60):
#if range > 60 ; "IndexError: list index out of range"
print(app_container[i].div['data-docid'])
file.write(app_container[i].div['data-docid'] + "\n")
file.close()
The problem is that I can only collect 60 packages names because the javascript isn't loaded and if I have to load more apps I have to scrolldown. How can I reproduce this behaviour in Python to have more than 60 results ?