diff --git a/web_poet/mixins.py b/web_poet/mixins.py index df2cc70d..7c07845d 100644 --- a/web_poet/mixins.py +++ b/web_poet/mixins.py @@ -58,9 +58,8 @@ def selector(self) -> parsel.Selector: class UrlShortcutsMixin: _cached_base_url = None - @abc.abstractmethod def _url_shortcuts_input(self) -> str: - raise NotImplementedError() # pragma: nocover + return self._selector_input() # type: ignore[attr-defined] @property def _base_url(self) -> str: @@ -105,9 +104,6 @@ def html(self): def _selector_input(self) -> str: return self.html - def _url_shortcuts_input(self) -> str: - return self.html - @property def base_url(self) -> str: """Return the base url of the given response""" diff --git a/web_poet/page_inputs/http.py b/web_poet/page_inputs/http.py index 79004e8f..f3c42bc2 100644 --- a/web_poet/page_inputs/http.py +++ b/web_poet/page_inputs/http.py @@ -237,9 +237,6 @@ def text(self) -> str: def _selector_input(self) -> str: return self.text - def _url_shortcuts_input(self) -> str: - return self.text - @property def encoding(self) -> Optional[str]: """Encoding of the response"""