[lurker] domain update
This commit is contained in:
parent
87fad4b7eb
commit
a9cd876cf9
|
@ -13,7 +13,7 @@ from ..utils import (
|
||||||
|
|
||||||
|
|
||||||
class LurkerIE(InfoExtractor):
|
class LurkerIE(InfoExtractor):
|
||||||
_VALID_URL = r'https?://(?:www\.)?lurker\.pl/post/(?P<id>[A-Za-z\d]{9})'
|
_VALID_URL = r'https?://(?:www\.)?lurker\.(?:pl|land)/post/(?P<id>[A-Za-z\d]{9})'
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
# no title (microblog/comment)
|
# no title (microblog/comment)
|
||||||
'url': 'https://www.lurker.pl/post/HMPQwlZrm',
|
'url': 'https://www.lurker.pl/post/HMPQwlZrm',
|
||||||
|
@ -44,7 +44,7 @@ class LurkerIE(InfoExtractor):
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
post_id = self._match_id(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({
|
data=bytes(compat_str(json.dumps({
|
||||||
'id': post_id,
|
'id': post_id,
|
||||||
'subsort': 'best',
|
'subsort': 'best',
|
||||||
|
@ -52,8 +52,8 @@ class LurkerIE(InfoExtractor):
|
||||||
headers={
|
headers={
|
||||||
'Accept': 'application/json',
|
'Accept': 'application/json',
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
'Origin': 'https://www.lurker.pl',
|
'Origin': 'https://www.lurker.land',
|
||||||
'Referer': 'https://www.lurker.pl/post/%s' % post_id,
|
'Referer': 'https://www.lurker.land/post/%s' % post_id,
|
||||||
})
|
})
|
||||||
|
|
||||||
post = None
|
post = None
|
||||||
|
@ -86,7 +86,7 @@ class LurkerIE(InfoExtractor):
|
||||||
'description': clean_html(post.get('body')) if post['hasTitle'] else None,
|
'description': clean_html(post.get('body')) if post['hasTitle'] else None,
|
||||||
'uploader': uploader,
|
'uploader': uploader,
|
||||||
'uploader_id': post.get('userId'),
|
'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')),
|
'timestamp': parse_iso8601(post.get('createdAt')),
|
||||||
'like_count': post.get('upvotes'),
|
'like_count': post.get('upvotes'),
|
||||||
'dislike_count': post.get('downvotes'),
|
'dislike_count': post.get('downvotes'),
|
||||||
|
|
Loading…
Reference in a new issue