-
Notifications
You must be signed in to change notification settings - Fork 7
/
__init__.py
25 lines (20 loc) · 1013 Bytes
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
""" Launch micro SEO analysis. """
from .content_title_analyzer import ContentTitleAnalyzer
from .internal_link_analyzer import InternalLinkAnalyzer
from .page_description_analyzer import PageDescriptionAnalyzer
from .page_title_analyzer import PageTitleAnalyzer
class SEOAnalyzer:
"""Instancy all micro SEO analyzers."""
def __init__(self, article):
self._title = getattr(article, "title", None)
self._description = getattr(article, "description", None)
self._content = getattr(article, "content", None)
self._settings = getattr(article, "settings", None)
self.page_title_analysis = PageTitleAnalyzer(title=self._title)
self.page_description_analysis = PageDescriptionAnalyzer(
description=self._description
)
self.content_title_analysis = ContentTitleAnalyzer(content=self._content)
self.internal_link_analysis = InternalLinkAnalyzer(
content=self._content, siteurl=self._settings["SITEURL"]
)