Finally found how.
In case someone else is trying to find this, here is how :
PageNode node = pageManager.GetPageNodes().Where(pN => pN.UrlName == yourURL).FirstOrDefault();
If the page for which you have the url is something like this :
just make sure that the UrlName parameter for the command is just the page name : This-is-the-page as in the above examples. Don't include folders, ~, or / in the UrlName string.
At least, this is what worked for me.
Hope it helps someone!