code: def _scrape_document(self):
          '''Extract links from the DOM.'''
          mock_response = self._new_mock_response(
              self._response, self._get_temp_path('phantom', '.html')
          )
  
          self._item_session.request = self._request
          self._item_session.response = mock_response
  
          self._processing_rule.scrape_document(item_session)
  
          if mock_response.body:
              mock_response.body.close(f _scrape_document(self):
          '''Extract links from the DOM.'''
          mock_response = self._new_mock_response(
              self._response, self._get_temp_path('phantom', '.html')
          )
  
          self._item_session.request = self._request
          self._item_session.response = mock_response
  
          self._processing_rule.scrape_document(item_session)
  
          if mock_response.body:
              mock_response.body.close()
docs: Extract links from the DOM.