crieur/documentation/guides/add_a_newspaper_source.md
koalp 756b1592b7
feat: allows to remove elements of html pages
A feature to remove elements of html pages based on css selectors have
been added.

The removal of link element that load external js have been added.
2021-04-24 03:45:13 +02:00

20 lines
506 B
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Add a newspaper source
---
How to add a newspaper source ? 
You must implement the `Newspaper` trait for you structure
# 1. Write the `metadata` function
It returns information about the newspaper
# 2. Write the `has_complete_acess` function
Usually, indicates if the user is logged in.
You are encouraged to test on the newspaper webpage by making an http call.
You can use the **TODO** helper function that will look if a specific css
selector is in the page located at the given url.