Oct-26-2019, 01:46 PM
Hi i want scrape multiple urls using LXML. The code im using allow me scrape one url a a time, but i want to do it in bulk. I tried to doit with a for loop, but i couldnt. The single url code is:
from lxml import html import requests page = requests.get('https://miwebsite.com') tree = html.fromstring(page.content) Titulo = tree.xpath('//div[@class="tituladorVIVO"]/text()') Fuentes = tree.xpath('//audio/@src') print ('Fuentes: ', Fuentes) print ('Titulo', Titulo)How can i do it with a list of urls. Regards