Web Scraping Playstore using Python
import requests
from bs4 import BeautifulSoup
import pandas as pd
url="https://play.google.com/store/apps/category/GAME?hl=en"
apps=requests.get(url)
sou=BeautifulSoup(apps.content,'lxml')
name=sou.findAll("div",attrs={"class":"WsMG1c takSXd"})
names=[]
for x in name:
names.append(x.get_text())
org=sou.findAll("div",attrs={"class":"b8cIId ReQCgd fmVS2c q1Food"})
dev=[]
for i in org:
dev.append(i.get_text())
df=pd.DataFrame({"Names":names,"Devolopers":dev})
df.to_csv("games.csv", mode = 'a',index=False, encoding='utf-8')
data=pd.read_csv("games.csv")
data.iloc[1:10]
0 Comments
Post a Comment