check icon indicating copy to clipboard operation
check copied to clipboard

Restore screenshot archiver to Pender

Open infojunkie opened this issue 5 years ago • 3 comments

Tell us about your request Pender 's screenshotting function was removed because it was a resource drain that endangered the deployment. Since then, we have introduced Narcissus as a flexible and efficient screenshotting service, that Pender can now call for its own needs. This request is about restoring the Pender screenshot archiver - using Narcissus as the screenshot provider.

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard? Taking a screenshot of a media being used in a fact-check or investigation is important, because the media could be subsequently modified or taken down.

Are you currently working around the issue? Manually taking a screenshot and attaching it to a Check item as an image comment.

Implementation hints

  • Emulate the removed MediaScreenshotArchiver - by calling Narcissus instead of the obsolete and inefficient implementation.
  • Restore tests

infojunkie avatar Sep 25 '20 21:09 infojunkie

@infojunkie I want to contribute. Can you guide me a bit how to implement this, as I'm new to this codebase? Thanks.

avats-dev avatar Oct 05 '20 01:10 avats-dev

@avats-dev thank you for your interest!

First you need to add a new archiver to Pender. The method archive_to_screenshot you'll create should call Narcissus to take a screenshot of the URL in background and add it to a screenshot key on media data.

You can check how Narcissus is called on CheckAPI: https://github.com/meedan/check-api/blob/develop/config/initializers/report_designer.rb#L92-L97

To run locally you need to clone Pender repository and start it with docker-compose up. Let us know if you have any difficulty.

danielafeitosa avatar Oct 05 '20 16:10 danielafeitosa

Thanks @danielafeitosa , I will get started on this and let you know if I'm stuck.

avats-dev avatar Oct 05 '20 20:10 avats-dev