Skip to content

What are the available data?

Corentin Bettiol edited this page Feb 10, 2020 · 9 revisions

Every check uses the site var, which is in fact an instance of the Site object.

The Site object is defined inside checks/site.py.

This object is created right after downloading the content of the page and contains several data:

Var Description
settings Contains all of the settings that are defined in django_check_eo/conf/settings.py.
Tip: you can update the values by creating a DJANGO_CHECK_SEO_SETTINGS dict in your project/settings.py file, like we used to do.
soup bs4.BeautifulSoup object, the content of the page you're analyzing (all the html, without nav & footer).
content list of bs4.element.Tag. You can iterate over it and look at the content of the website (source).
It contains all of the blocks who have the container class (since django cms seems to put all the content in elements with container classes).
content_text str that contain all the textual content of the content var. Used in the html page to present the parsed content: img.
full_url The full url (used to know if keywords are present in the url).
keywords A list populated by check_keywords.py, that contains the keywords of the page (found in the meta keywords tag).
problems list of custom_list that will be displayed:
"name": "name of error",
"settings": "settings",
"found": "custom string",
"searched_in": "custom list",
"description": "description of the problem"
warnings list of custom_list that will be displayed:
"name": "name of warning",
"settings": "settings",
"found": "custom string",
"searched_in": "custom list",
"description": "description of the warning"
success list of custom_list that will be displayed:
"name": "name of success",
"settings": "settings",
"found": "custom string",
"searched_in": "custom list",
"description": "description of the success"

Content

If you want to know the reasons why we chose these checks in particular.

Checks that are not included inside the project


Code

Clone this wiki locally