myURL = "https://someurl.com/dir/page.html"
URLparts = myURL.rpartition('/')
print(URLparts[0])
print(myURL.rpartition("/")[0])
print(URLparts)
myURL = "https://someurl.com/dir/page.html"
URLparts = myURL.rpartition('/')
print(URLparts[0])
print(myURL.rpartition("/")[0])
print(URLparts)