meedan / check

Development environment for Meedan Check, a collaborative media annotation platform
https://meedan.com/check
MIT License
125 stars 53 forks source link

Restore screenshot archiver to Pender #13

Closed infojunkie closed 1 year ago

infojunkie commented 3 years ago

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

avats-dev commented 3 years ago

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

danielafeitosa commented 3 years ago

@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.

avats-dev commented 3 years ago

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