40 dom = html.fromstring(resp.text)
42 for app
in dom.xpath(
'//a[@class="package-header"]'):
43 app_url = app.xpath(
'./@href')[0]
44 app_title = extract_text(app.xpath(
'./div/h4[@class="package-name"]/text()'))
46 extract_text(app.xpath(
'./div/div/span[@class="package-summary"]')).strip()
48 + extract_text(app.xpath(
'./div/div/span[@class="package-license"]')).strip()
50 thumbnail = app.xpath(
'./img[@class="package-icon"]/@src')[0]
52 results.append({
'url': app_url,
'title': app_title,
'content': app_content,
'thumbnail': thumbnail})