Skip to content

Commit

Permalink
update README to add an example for handling fullHtml in callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
BurnzZ committed Jan 28, 2022
1 parent 5baa342 commit e8b7770
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,22 @@ from the page::
yield real_estate_page.to_item()

You can even use ``AutoExtractWebPage`` if what you need is the raw browser HTML to
extract some additional data. Visit the full list of `supported page types`_
to get a better idea of the supported pages.
extract some additional data. Visit the full list of `supported page types
<https://docs.zyte.com/automatic-extraction.html#result-fields>`_ to get a better idea
of the supported pages.

Lastly, if you have a an AutoExtract subscription with `fullHtml` set to True,
you can access the HTML data that was used by AutoExtract in case you need it.
Here's an example:

.. code-block:: python
def parse_product(self, response: DummyResponse, product_page: AutoExtractProductPage, html_page: AutoExtractWebPage):
product_item = product_page.to_item()
# You can easily interact with the html_page using these selectors.
html_page.css(...)
html_page.xpath(...)
Configuration
^^^^^^^^^^^^^
Expand Down

0 comments on commit e8b7770

Please sign in to comment.