В этом случае Вам необходимо использовать Selenium
.Я попробую это для вас, чтобы получить все приложения.Я постараюсь объяснить, надеюсь, поймет.
Использование Selenium
более мощно, чем другие функции Python. Я использовал ChromeDriver, так что если вы еще не установили, вы можете установить его в
http://chromedriver.chromium.org/
from time import sleep
from selenium import webdriver
options = webdriver.ChromeOptions()
driver=webdriver.Chrome(chrome_options=options,
executable_path=r'This part is your Driver path')
driver.get('https://play.google.com/store/apps/category/NEWS_AND_MAGAZINES/collection/topselling_paid')
driver.execute_script("window.scrollTo(0, document.body.scrollHeight);") ## Scroll to bottom of page with using driver
sleep(5) ## Give a delay for allow to page scroll . If we dont program will already take 60 element without letting scroll
x = driver.find_elements_by_css_selector("div[class='card-content id-track-click id-track-impression']") ## Declare which class
for a in x:
print a.text
driver.close()
ВЫХОД:
1. Pocket Casts
Podcast Media LLC
₺24,99
2. Broadcastify Police Scanner Pro
RadioReference.com LLC
₺18,99
3. Relay for reddit (Pro)
DBrady
₺8,00
4. Sync for reddit (Pro)
Red Apps LTD
₺15,00
5. reddit is fun golden platinum (unofficial)
TalkLittle
₺9,99
... **UP TO 75**
Примечание:
Не возражайте против денег.Это моя валюта счета, поэтому она изменится в вашей.
ОБНОВЛЕНИЕ В СООТВЕТСТВИИ С ВАШИМ КОММЕНТАРИЕМ:
Тот же самый data-docid также находится в теге span.можно получить с помощью get_attribute
.Просто добавьте следующие коды в ваш проект.
y = driver.find_elements_by_css_selector("span[class=preview-overlay-container]")
for b in y :
print b.get_attribute('data-docid')
ВЫХОД
au.com.shiftyjelly.pocketcasts
com.radioreference.broadcastifyPro
reddit.news
com.laurencedawson.reddit_sync.pro
com.andrewshu.android.redditdonation
com.finazzi.distquakenoads
com.twitpane.premium
org.fivefilters.kindleit
.... UP TO 75