1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-06-02 10:29:28 +00:00

chore: adjust base_url format

This commit is contained in:
jhon 2023-09-13 16:25:58 -03:00
parent 66ab0814c4
commit 21cabd7fe0
2 changed files with 2 additions and 1 deletions

View file

@ -544,6 +544,7 @@ class TestUtil(unittest.TestCase):
self.assertEqual(base_url('http://foo.de/bar/'), 'http://foo.de/bar/')
self.assertEqual(base_url('http://foo.de/bar/baz'), 'http://foo.de/bar/')
self.assertEqual(base_url('http://foo.de/bar/baz?x=z/x/c'), 'http://foo.de/bar/')
self.assertEqual(base_url('http://foo.de/bar/baz&x=z&w=y/x/c'), 'http://foo.de/bar/baz&x=z&w=y/x/')
def test_urljoin(self):
self.assertEqual(urljoin('http://foo.de/', '/a/b/c.txt'), 'http://foo.de/a/b/c.txt')

View file

@ -3804,7 +3804,7 @@ def url_basename(url):
def base_url(url):
return re.match(r'https?://[^?#&]+/', url).group()
return re.match(r'https?://[^?#]+/', url).group()
def urljoin(base, path):