michaelhelmick / lassie

Web Content Retrieval for Humans™
https://lassie.readthedocs.org
MIT License
614 stars 49 forks source link

Error while fetching URL #70

Closed Sparinfosys closed 6 years ago

Sparinfosys commented 6 years ago

Code

import lassie url = "https://www.eater.com/2018/5/3/17311386/best-restaurants-oakland-bay-area" lassie.fetch(url)

Error Log


AttributeError Traceback (most recent call last)

in () 1 url = "https://www.eater.com/2018/5/3/17311386/best-restaurants-oakland-bay-area" ----> 2 lassie.fetch(url) ~/anaconda3/envs/mobi_mule/lib/python3.6/site-packages/lassie/api.py in fetch(url, **kwargs) 41 """ 42 l = Lassie() ---> 43 return l.fetch(url, **kwargs) ~/anaconda3/envs/mobi_mule/lib/python3.6/site-packages/lassie/core.py in fetch(self, url, open_graph, twitter_card, touch_icon, favicon, all_images, parser, handle_file_content, canonical) 177 soup = BeautifulSoup(clean_text(html), parser) 178 --> 179 self._filter_amp_data(soup, data, url, all_images) 180 181 if open_graph: ~/anaconda3/envs/mobi_mule/lib/python3.6/site-packages/lassie/core.py in _filter_amp_data(self, soup, data, url, all_images) 394 }) 395 elif isinstance(image, object): --> 396 image_list = image.get('@list') 397 if image_list: 398 for _image in image_list: AttributeError: 'list' object has no attribute 'get'
michaelhelmick commented 6 years ago

0.11.6 is released on PyPI