mirror of
https://github.com/scrapy/scrapy.git
synced 2025-02-25 09:24:20 +00:00
Amend guess_scheme() docstring
This commit is contained in:
parent
c6f374f2eb
commit
e9f6b98816
@ -125,10 +125,7 @@ def add_http_if_no_scheme(url):
|
||||
|
||||
|
||||
def guess_scheme(url):
|
||||
"""Given an URL as string,
|
||||
returns a FileURI if it looks like a file path,
|
||||
otherwise returns an HTTP URL
|
||||
"""
|
||||
"""Add an URL scheme if missing: file:// for filepath-like input or http:// otherwise."""
|
||||
parts = urlparse(url)
|
||||
if parts.scheme:
|
||||
return url
|
||||
|
Loading…
x
Reference in New Issue
Block a user