1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2025-06-30 15:26:19 +00:00

Merge 6e34e8f57997adeed1591322d0e247f57ea2511c into 711e72c292327674c4a0593fdbb83d6347738ec9

This commit is contained in:
Ryan Welton 2025-02-24 05:09:40 +00:00 committed by GitHub
commit ce4076da6c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -596,6 +596,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):