We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
urljoin
1 parent d0f1895 commit 5f9c398Copy full SHA for 5f9c398
scrapling/parser.py
@@ -2,6 +2,7 @@
2
import os
3
import re
4
from difflib import SequenceMatcher
5
+from urllib.parse import urljoin
6
7
from cssselect import SelectorError, SelectorSyntaxError
8
from cssselect import parse as split_selectors
@@ -243,6 +244,10 @@ def _traverse(node: html.HtmlElement) -> None:
243
244
245
return TextHandler(separator.join([s for s in _all_strings]))
246
247
+ def urljoin(self, relative_url: str) -> str:
248
+ """Join this Adaptor's url with a relative url to form an absolute full URL."""
249
+ return urljoin(self.url, relative_url)
250
+
251
@property
252
def attrib(self) -> AttributesHandler:
253
"""Get attributes of the element"""
0 commit comments