Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
leVirve committed Jul 29, 2016
2 parents 6bddf90 + 96869a8 commit 762653d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dcard/posts.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,11 @@ def get_links(cls, post_ids):
def get_comments_parallel(cls, post_id, comments_count):
pages = -(-comments_count // cls.comments_per_page)
comments_futures = (
self.client.fut_get(api.post_url_pattern.format(post_id=post_id),
params={'after': page * self.comments_per_page})
cls.client.fut_get(api.post_comments_url_pattern.format(post_id=post_id),
params={'after': page * cls.comments_per_page})
for page in range(pages)
)
return comments_futures

@classmethod
def get_comments_serial(cls, post_id):
Expand Down Expand Up @@ -139,7 +140,6 @@ def format(self, bundle, callback):
'links': links.result().json() if links else None,
'comments': flatten_lists([cmts.result().json() for cmts in comments]) if comments else None
})
print(post)
yield post

def parse_resources(self):
Expand Down

0 comments on commit 762653d

Please sign in to comment.