From a9cd876cf965510ef39284ae5a181f88a60a01e3 Mon Sep 17 00:00:00 2001 From: Laura Liberda Date: Fri, 5 Feb 2021 13:00:36 +0100 Subject: [PATCH] [lurker] domain update --- haruhi_dl/extractor/lurker.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/haruhi_dl/extractor/lurker.py b/haruhi_dl/extractor/lurker.py index b534678f3..35533cd0a 100644 --- a/haruhi_dl/extractor/lurker.py +++ b/haruhi_dl/extractor/lurker.py @@ -13,7 +13,7 @@ from ..utils import ( class LurkerIE(InfoExtractor): - _VALID_URL = r'https?://(?:www\.)?lurker\.pl/post/(?P[A-Za-z\d]{9})' + _VALID_URL = r'https?://(?:www\.)?lurker\.(?:pl|land)/post/(?P[A-Za-z\d]{9})' _TESTS = [{ # no title (microblog/comment) 'url': 'https://www.lurker.pl/post/HMPQwlZrm', @@ -44,7 +44,7 @@ class LurkerIE(InfoExtractor): def _real_extract(self, url): post_id = self._match_id(url) - meta = self._download_json('https://api.lurker.pl/v3?action=POST_GET', post_id, + meta = self._download_json('https://lurker.land/api/v3?action=POST_GET', post_id, data=bytes(compat_str(json.dumps({ 'id': post_id, 'subsort': 'best', @@ -52,8 +52,8 @@ class LurkerIE(InfoExtractor): headers={ 'Accept': 'application/json', 'Content-Type': 'application/json', - 'Origin': 'https://www.lurker.pl', - 'Referer': 'https://www.lurker.pl/post/%s' % post_id, + 'Origin': 'https://www.lurker.land', + 'Referer': 'https://www.lurker.land/post/%s' % post_id, }) post = None @@ -86,7 +86,7 @@ class LurkerIE(InfoExtractor): 'description': clean_html(post.get('body')) if post['hasTitle'] else None, 'uploader': uploader, 'uploader_id': post.get('userId'), - 'uploader_url': 'https://www.lurker.pl/user/%s' % uploader, + 'uploader_url': 'https://lurker.land/user/%s' % uploader, 'timestamp': parse_iso8601(post.get('createdAt')), 'like_count': post.get('upvotes'), 'dislike_count': post.get('downvotes'),