Понять цикл для страниц и ссылок ⇐ Python

Программы на Python
Anonymous
Понять цикл для страниц и ссылок

Сообщение Anonymous »

из lxml import html
запросы на импорт
import json

page = Requests.get('https://libertyvf.tv/series /')
tree = html.fromstring(page.content)

serieLinks = Tree.xpath("//div[@class='divstreaming'] /a/@href")
print('serieLinks', serieLinks)

page = Requests.get(serieLinks[0])
tree = html.fromstring(page.content)

episodeLinks = Tree.xpath("//a[@class='num_episode']/@href")
print('episodeLinks', EpisodeLinks)

page = Requests.get(episodeLinks[0])
tree = html.fromstring(page.content)< /p>

пожалуйста, как создать цикл для страниц

СДЕЛАТЬ: выберите Uqload VF и/или VOSTFR
streamingIdVf =tree.xpath("//div[@heberger='uqload' and @title='Regarder sur uqload en VF']/@streaming")
print( 'streamingIdVf',streamingIdVf)

page = Requests.get("https://libertyvf.tv/v2/video.php?id=" +streamingIdVf[0] + "&type=series")
print('page', page.text)

parsed_json = (json.loads(page.text))
print('parsed_json', parsed_json)

embed = parsed_json['bande']

print( 'встроить', встроить)

Я хочу встроить все ссылки со всей страницы, как создать цикл, пожалуйста

Подробнее здесь: https://stackoverflow.com/questions/615 ... s-and-link

Вернуться в «Python»