(attr)
| 1661 | 'absolute. It can be provided by the base_url parameter.')) |
| 1662 | |
| 1663 | def repl(attr): |
| 1664 | def rep(i, e): |
| 1665 | attr_value = self(e).attr(attr) |
| 1666 | # when label hasn't such attr, pass |
| 1667 | if attr_value is None: |
| 1668 | return None |
| 1669 | |
| 1670 | # skip specific "protocol" schemas |
| 1671 | if any(attr_value.startswith(schema) |
| 1672 | for schema in ('tel:', 'callto:', 'sms:')): |
| 1673 | return None |
| 1674 | |
| 1675 | return self(e).attr(attr, |
| 1676 | urljoin(base_url, attr_value.strip())) |
| 1677 | return rep |
| 1678 | |
| 1679 | self('a').each(repl('href')) |
| 1680 | self('link').each(repl('href')) |
nothing calls this directly
no outgoing calls
no test coverage detected