├── tests ├── __init__.py ├── oembed │ ├── __init__.py │ └── test_youtube.py ├── templates │ ├── core │ │ ├── empty.html │ │ ├── no_html_tag.html │ │ ├── bad_keywords.html │ │ ├── class_setting_is_none.html │ │ ├── class_vs_method_settings.html │ │ ├── bad_image_dimensions.html │ │ ├── image_dimensions.html │ │ └── retrieve_all_images.html │ ├── handle_file_content │ │ └── image_file.jpg │ ├── generic │ │ ├── no_title.html │ │ ├── favicon.html │ │ ├── canonical.html │ │ ├── bad_locale.html │ │ └── all_properties.html │ ├── open_graph │ │ ├── og_image_relative_url.html │ │ ├── no_og_title_no_og_url.html │ │ ├── og_image_plus_two_body_images.html │ │ └── all_properties.html │ ├── twitter_card │ │ ├── no_og_title_use_twitter_title.html │ │ └── all_properties.html │ └── amp │ │ ├── bad_json.html │ │ ├── str_thumbnail_image.html │ │ ├── list_json.html │ │ ├── video_objects.html │ │ ├── thumbnail_image.html │ │ ├── list_thumbnail_image.html │ │ ├── str_image.html │ │ └── list_image_list_str.html ├── json │ └── youtube │ │ ├── no_type.json │ │ ├── bad_html.json │ │ ├── no_thumb.json │ │ └── good.json ├── test_handle_file_content.py ├── test_twitter_card.py ├── test_generic.py ├── base.py ├── test_open_graph.py ├── test_amp.py └── test_core.py ├── lassie ├── filters │ ├── oembed │ │ ├── __init__.py │ │ └── providers.py │ ├── __init__.py │ ├── apple.py │ ├── generic.py │ └── social.py ├── exceptions.py ├── compat.py ├── __init__.py ├── api.py ├── utils.py └── core.py ├── MANIFEST.in ├── pyproject.toml ├── test_requirements.txt ├── requirements.txt ├── .coveragerc ├── .isort.cfg ├── docs ├── api.rst ├── usage │ ├── install.rst │ ├── advanced_usage.rst │ └── starting_out.rst ├── index.rst ├── Makefile ├── make.bat └── conf.py ├── .gitignore ├── AUTHORS.rst ├── .vscode └── settings.json ├── LICENSE ├── setup.py ├── .github └── workflows │ └── ci.yml ├── README.rst └── HISTORY.rst /tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/oembed/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lassie/filters/oembed/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/templates/core/empty.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README.rst HISTORY.rst LICENSE requirements.txt 2 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["setuptools", "wheel"] # PEP 508 specifications. 3 | -------------------------------------------------------------------------------- /test_requirements.txt: -------------------------------------------------------------------------------- 1 | -r requirements.txt 2 | python-coveralls==2.1.0 3 | nose-cov==1.6 4 | mock==1.0.1 5 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | requests>=2.18.4,<3.0.0 2 | beautifulsoup4>=4.9.0,<4.10.0 3 | html5lib==1.0b10 4 | python-oembed 5 | -------------------------------------------------------------------------------- /.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | omit = ../lassie/compat.py 3 | 4 | [report] 5 | exclude_lines = 6 | pragma: no cover 7 | 8 | def __repr__ 9 | -------------------------------------------------------------------------------- /tests/templates/handle_file_content/image_file.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelhelmick/lassie/HEAD/tests/templates/handle_file_content/image_file.jpg -------------------------------------------------------------------------------- /tests/templates/generic/no_title.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /lassie/exceptions.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | lassie.exceptions 5 | ~~~~~~~~~~~~~~~~~ 6 | 7 | This module contains the set of Lassie exceptions. 8 | 9 | """ 10 | 11 | class LassieError(Exception): 12 | """Generic catch-all Exceptions""" 13 | pass 14 | -------------------------------------------------------------------------------- /tests/templates/open_graph/og_image_relative_url.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |