Jump to content
Fórum Script Brasil

Charleston Senne da Silva

Membros
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutro

About Charleston Senne da Silva

  1. url = ('https://tenda-api.stoomlab.com.br/api/public/store/category/12/products?query=%7B%22link%22:%22mercearia%22%7D&page={}&order=relevance&save=true') html = request.urlopen(url).read() soup = BeautifulSoup(html, 'lxml') site_json = json.loads(soup.text) for d in site_json['products']: if d.get('name') and d.get('price'): print(d.get('name'),'|','R$', d.get('price')) if site_json['current_page'] <= 54: print('iniciando a contagem') cont = site_json['current_page'] + 1 url.format(cont) else: print('A contagem não f
×
×
  • Create New...