@@ -141,7 +141,7 @@ class RedditExtractor(Extractor):
|
||||
|
||||
match = match_submission(url)
|
||||
if match:
|
||||
extra.append(match.group(1))
|
||||
extra.append(match[1])
|
||||
elif not match_user(url) and not match_subreddit(url):
|
||||
if previews and "comment" not in data and \
|
||||
"preview" in data:
|
||||
@@ -309,7 +309,7 @@ class RedditSubmissionExtractor(RedditExtractor):
|
||||
|
||||
def __init__(self, match):
|
||||
RedditExtractor.__init__(self, match)
|
||||
self.submission_id = match.group(1)
|
||||
self.submission_id = match[1]
|
||||
|
||||
def submissions(self):
|
||||
return (self.api.submission(self.submission_id),)
|
||||
@@ -326,14 +326,14 @@ class RedditImageExtractor(Extractor):
|
||||
|
||||
def __init__(self, match):
|
||||
Extractor.__init__(self, match)
|
||||
domain = match.group(1)
|
||||
self.path = match.group(2)
|
||||
domain = match[1]
|
||||
self.path = match[2]
|
||||
if domain == "preview.redd.it":
|
||||
self.domain = "i.redd.it"
|
||||
self.query = ""
|
||||
else:
|
||||
self.domain = domain
|
||||
self.query = match.group(3) or ""
|
||||
self.query = match[3] or ""
|
||||
|
||||
def items(self):
|
||||
url = "https://{}/{}{}".format(self.domain, self.path, self.query)
|
||||
|
||||
Reference in New Issue
Block a user