Skip to content
This repository has been archived by the owner on Nov 25, 2023. It is now read-only.

Commit

Permalink
Merge pull request #3 from kozobot/master
Browse files Browse the repository at this point in the history
Filter reported posts
  • Loading branch information
DIGITALCRIMINAL authored Aug 25, 2021
2 parents 5dbddf6 + 549219d commit d515478
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apis/onlyfans/classes/create_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,9 @@ async def get_posts(
results = await api_helper.scrape_endpoint_links(
links, self.session_manager, api_type
)
final_results = [create_post(x, self) for x in results]
# Filter out posts that are reported by the user as these will not have content
filtered_results = list(filter(lambda opt: not ("isReportedByMe" in opt and opt["isReportedByMe"]), results))
final_results = [create_post(x, self) for x in filtered_results]
self.temp_scraped.Posts = final_results
return final_results

Expand Down

0 comments on commit d515478

Please sign in to comment.