From 4a48287075fab4cc59dea86a4e9ed208f67ec4bb Mon Sep 17 00:00:00 2001 From: JChris246 Date: Fri, 26 Jun 2020 20:27:34 -0400 Subject: [PATCH 1/6] Updated regex to accommodate new video_id with letters --- youtube_dl/extractor/xhamster.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/xhamster.py b/youtube_dl/extractor/xhamster.py index 0f7be6a7d93..dd0ea4ca3e9 100644 --- a/youtube_dl/extractor/xhamster.py +++ b/youtube_dl/extractor/xhamster.py @@ -26,7 +26,7 @@ class XHamsterIE(InfoExtractor): (?:.+?\.)?%s/ (?: movies/(?P\d+)/(?P[^/]*)\.html| - videos/(?P[^/]*)-(?P\d+) + videos/(?P[^/]*)-(?P[\da-z]+) ) ''' % _DOMAINS _TESTS = [{ From 8c205580649393283d87d74f6b04a7b0a0c1b0e9 Mon Sep 17 00:00:00 2001 From: JChris246 Date: Sun, 28 Jun 2020 09:34:19 -0400 Subject: [PATCH 2/6] Added test for new url format --- youtube_dl/extractor/xhamster.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/youtube_dl/extractor/xhamster.py b/youtube_dl/extractor/xhamster.py index dd0ea4ca3e9..330a0ffe37b 100644 --- a/youtube_dl/extractor/xhamster.py +++ b/youtube_dl/extractor/xhamster.py @@ -105,6 +105,9 @@ class XHamsterIE(InfoExtractor): }, { 'url': 'http://xhamster.com/movies/2221348/britney_spears_sexy_booty.html?hd', 'only_matching': True, + }, { + 'url': 'http://de.xhamster.com/videos/skinny-girl-fucks-herself-hard-in-the-forest-xhnBJZx', + 'only_matching': True, }] def _real_extract(self, url): From ff13f279ce96d9301312b8c422a9280ca976d024 Mon Sep 17 00:00:00 2001 From: JChris246 Date: Sun, 28 Jun 2020 09:52:23 -0400 Subject: [PATCH 3/6] Minor change to regex to include capital letters --- youtube_dl/extractor/xhamster.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/xhamster.py b/youtube_dl/extractor/xhamster.py index 330a0ffe37b..3fcf1dd87ed 100644 --- a/youtube_dl/extractor/xhamster.py +++ b/youtube_dl/extractor/xhamster.py @@ -26,7 +26,7 @@ class XHamsterIE(InfoExtractor): (?:.+?\.)?%s/ (?: movies/(?P\d+)/(?P[^/]*)\.html| - videos/(?P[^/]*)-(?P[\da-z]+) + videos/(?P[^/]*)-(?P[\dA-z]+) ) ''' % _DOMAINS _TESTS = [{ From e9c12c6537d8577ba67536c09ae1115e7527538a Mon Sep 17 00:00:00 2001 From: JChris246 Date: Mon, 29 Jun 2020 13:01:14 -0400 Subject: [PATCH 4/6] Adding requested changes Changed regex from [\dA-z]+ to \w+ Updated movies id regex --- youtube_dl/extractor/xhamster.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/xhamster.py b/youtube_dl/extractor/xhamster.py index 3fcf1dd87ed..0eeb79774cb 100644 --- a/youtube_dl/extractor/xhamster.py +++ b/youtube_dl/extractor/xhamster.py @@ -25,8 +25,8 @@ class XHamsterIE(InfoExtractor): https?:// (?:.+?\.)?%s/ (?: - movies/(?P\d+)/(?P[^/]*)\.html| - videos/(?P[^/]*)-(?P[\dA-z]+) + movies/(?P\w+)/(?P[^/]*)\.html| + videos/(?P[^/]*)-(?P\w+) ) ''' % _DOMAINS _TESTS = [{ From c300582cdb046849f896e1cefaf171fa1b88cdce Mon Sep 17 00:00:00 2001 From: JChris246 Date: Thu, 2 Jul 2020 13:12:04 -0400 Subject: [PATCH 5/6] Changed regex to exclusively include numbers and letters --- youtube_dl/extractor/xhamster.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/xhamster.py b/youtube_dl/extractor/xhamster.py index 0eeb79774cb..81d0d6cf102 100644 --- a/youtube_dl/extractor/xhamster.py +++ b/youtube_dl/extractor/xhamster.py @@ -25,8 +25,8 @@ class XHamsterIE(InfoExtractor): https?:// (?:.+?\.)?%s/ (?: - movies/(?P\w+)/(?P[^/]*)\.html| - videos/(?P[^/]*)-(?P\w+) + movies/(?P[\dA-z]+)/(?P[^/]*)\.html| + videos/(?P[^/]*)-(?P[\dA-z]+) ) ''' % _DOMAINS _TESTS = [{ From adcf71845654e091525bb9b39d28561d8a724fe4 Mon Sep 17 00:00:00 2001 From: JChris246 Date: Wed, 29 Jul 2020 11:51:32 -0400 Subject: [PATCH 6/6] updated regex to only be alphanumeric --- youtube_dl/extractor/xhamster.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/xhamster.py b/youtube_dl/extractor/xhamster.py index 81d0d6cf102..72ce5e1d375 100644 --- a/youtube_dl/extractor/xhamster.py +++ b/youtube_dl/extractor/xhamster.py @@ -25,8 +25,8 @@ class XHamsterIE(InfoExtractor): https?:// (?:.+?\.)?%s/ (?: - movies/(?P[\dA-z]+)/(?P[^/]*)\.html| - videos/(?P[^/]*)-(?P[\dA-z]+) + movies/(?P[\dA-Za-z]+)/(?P[^/]*)\.html| + videos/(?P[^/]*)-(?P[\dA-Za-z]+) ) ''' % _DOMAINS _TESTS = [{