我想从以下网站中提取标题和描述:
查看来源: 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." />
我想要标题和元内容。
我用过鹅,但提取效果不好。这是我的代码:
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]
结果为空