This commit is contained in:
Simon 2018-06-20 21:52:45 -04:00
parent a7e4e3ae1f
commit 4ca56d2317

View File

@ -1,5 +1,5 @@
import requests import requests
from urllib.parse import urljoin from urllib.parse import urljoin, urlparse
from bs4 import BeautifulSoup from bs4 import BeautifulSoup
import os import os
import validators import validators
@ -163,8 +163,7 @@ def is_od(url):
try: try:
if url.startswith("ftp://"): if url.startswith("ftp://"):
url = url[6:-1] # Remove schema and trailing slash ftp = FTP(urlparse(url).netloc)
ftp = FTP(url)
ftp.login() ftp.login()
ftp.close() ftp.close()
return True return True