mirror of
https://github.com/simon987/od-database.git
synced 2025-04-20 10:56:47 +00:00
Fixes #2
This commit is contained in:
parent
a7e4e3ae1f
commit
4ca56d2317
@ -1,5 +1,5 @@
|
||||
import requests
|
||||
from urllib.parse import urljoin
|
||||
from urllib.parse import urljoin, urlparse
|
||||
from bs4 import BeautifulSoup
|
||||
import os
|
||||
import validators
|
||||
@ -163,8 +163,7 @@ def is_od(url):
|
||||
|
||||
try:
|
||||
if url.startswith("ftp://"):
|
||||
url = url[6:-1] # Remove schema and trailing slash
|
||||
ftp = FTP(url)
|
||||
ftp = FTP(urlparse(url).netloc)
|
||||
ftp.login()
|
||||
ftp.close()
|
||||
return True
|
||||
|
Loading…
x
Reference in New Issue
Block a user