MCPcopy
hub / github.com/scrapy/scrapy / _get_form_url

Function _get_form_url

scrapy/http/request/form.py:105–112  ·  view source on GitHub ↗
(form: FormElement, url: str | None)

Source from the content-addressed store, hash-verified

103
104
105def _get_form_url(form: FormElement, url: str | None) -> str:
106 assert form.base_url is not None # typing
107 if url is None:
108 action = form.get("action")
109 if action is None:
110 return form.base_url
111 return urljoin(form.base_url, strip_html5_whitespace(action))
112 return urljoin(form.base_url, url)
113
114
115def _urlencode(seq: Iterable[FormdataKVType], enc: str) -> str:

Callers 1

from_responseMethod · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected