Pesquisar na Comunidade
Mostrando resultados para as tags ''webcrawling''.
Encontrado 1 registro
-
Olá, Estou com dificuldades para extrair informações de múltiplos websites via python. VEJA O CÓDIGO: ========================================================================== # encoding: utf-8 import urllib2 from bs4 import BeautifulSoup # specify the url quote_page = 'AQUI EU GOSTARIA DE INSERIR, APROXIMADAMENTE UNS 100 LINKS' # query the website and return the html to the variable 'page' page = urllib2.urlopen(quote_page) # parse the html using beautiful soap and store in variable `soup` soup = BeautifulSoup(page, 'html.parser') p_tags = soup.findAll('p',text=True) #print p_tags print(p_tags) ====================================================================== Meu objetivo é extrair um conteúdo em texto de inúmeros URL´s de um determinado website. Esse código funciona separadamente, mas não sei como fazer no caso de múltiplas URL. Desde já, obrigado.
- 1 resposta
-
- webcrawling
- beautifulsoup
-
(e %d mais)
Tags: