from autoscraper import AutoScraper
import pandas as pd
Run to view results
uri = 'https://www.nike.com/in/w/mens-jordan-shoes-37eefznik1zy7ok'
wantedList = ['Air Jordan 1 Low SE', 'MRP : ₹ 10 295.00']
Run to view results
scr = AutoScraper()
lats = scr.build(uri, wanted_list=wantedList)
Run to view results
data = scr.get_result_similar(url=uri, grouped=True)
# scr.set_rule_aliases({'rule_k0k5' : 'title', 'rule_eco7':'price'})
# scr.keep_rules(['rule_k0k5','rule_eco7' ])
scr.save('nike-jorden')
Run to view results
data
Run to view results
keys = list(data.keys())
Run to view results
df = pd.DataFrame(columns=['name', 'price'])
df['name'] = data[keys[0]]
df['price'] = [float(i.split()[3] + i.split()[4]) for i in data[keys[-1]]]
Run to view results
df
Run to view results