我想从以下网站中提取标题和描述:
view-source:http://www.virginaustralia.com/au/en/bookings/flights/make-a-booking/
使用以下源代码片段:
<title>Book a Virgin Australia Flight | Virgin Australia
</title>
<meta name="keywords" content="" />
<meta name="description" content="Search for and book Virgin Australia and partner flights to Australian and international destinations." />
我需要标题和元数据内容。
我尝试使用Goose来提取,但效果不佳。以下是我的代码:
website_title = [g.extract(url).title for url in clean_url_data]
并且
website_meta_description=[g.extract(urlw).meta_description for urlw in clean_url_data]
结果为空