summaryrefslogtreecommitdiff
path: root/bs4/diagnose.py
diff options
context:
space:
mode:
Diffstat (limited to 'bs4/diagnose.py')
-rw-r--r--bs4/diagnose.py15
1 files changed, 0 insertions, 15 deletions
diff --git a/bs4/diagnose.py b/bs4/diagnose.py
index 3bf583f..e079772 100644
--- a/bs4/diagnose.py
+++ b/bs4/diagnose.py
@@ -59,21 +59,6 @@ def diagnose(data):
if hasattr(data, 'read'):
data = data.read()
- elif data.startswith("http:") or data.startswith("https:"):
- print(('"%s" looks like a URL. Beautiful Soup is not an HTTP client.' % data))
- print("You need to use some other library to get the document behind the URL, and feed that document to Beautiful Soup.")
- return
- else:
- try:
- if os.path.exists(data):
- print(('"%s" looks like a filename. Reading data from the file.' % data))
- with open(data) as fp:
- data = fp.read()
- except ValueError:
- # This can happen on some platforms when the 'filename' is
- # too long. Assume it's data and not a filename.
- pass
- print("")
for parser in basic_parsers:
print(("Trying to parse your markup with %s" % parser))