added explanation for 2 twitter archivers

This commit is contained in:
msramalho
2022-06-27 11:17:23 +02:00
parent 179528562b
commit 34536e7f14
3 changed files with 10 additions and 1 deletions

View File

@@ -151,6 +151,9 @@ Code is split into functional concepts:
### Current Archivers
Archivers are tested in a meaningful order with Wayback Machine being the failsafe, that can easily be changed in the code.
> Note: We have 2 Twitter Archivers (`TwitterArchiver`, `TwitterApiArchiver`) because one requires Twitter API V2 credentials and has better results and the other does not rely on official APIs and misses out on some content.
```mermaid
graph TD
A(Archiver) -->|parent of| B(TelethonArchiver)

View File

@@ -7,6 +7,10 @@ from .base_archiver import Archiver, ArchiveResult
class TwitterArchiver(Archiver):
"""
This Twitter Archiver uses unofficial scraping methods, and it works as
an alternative to TwitterApiArchiver when no API credentials are provided.
"""
name = "twitter"
link_pattern = re.compile(r"twitter.com\/(?:\#!\/)?(\w+)\/status(?:es)?\/(\d+)")

View File

@@ -39,8 +39,10 @@ secrets:
# optional, but allows access to more content such as large videos, talk to @botfather
bot_token: your bot-token
# twitter configuration - API V2 only
# if you don't provide credentials the less-effective unofficial TwitterArchiver will be used instead
twitter:
# twitter configuration - API V2 only - either bearer_token only
# either bearer_token only
bearer_token: ""
# OR all of the below
consumer_key: ""