Browse Source

add explanation of token

ta 2 years ago
parent
commit
05851978cf
1 changed files with 2 additions and 0 deletions
  1. 2 0
      searx/engines/twitter.py

+ 2 - 0
searx/engines/twitter.py

@@ -27,6 +27,8 @@ def request(query, params):
     params['url'] = search_url.format(url=url, query=urlencode({'q': query}))
     params['url'] = search_url.format(url=url, query=urlencode({'q': query}))
 
 
     params['headers'] = {
     params['headers'] = {
+        # This token is used in the Twitter web interface (twitter.com). Without this header, the API doesn't work.
+        # The value of the token has never changed (or maybe once a long time ago).
         # https://github.com/zedeus/nitter/blob/5f31e86e0e8578377fa7d5aeb9631bbb2d35ef1e/src/consts.nim#L5
         # https://github.com/zedeus/nitter/blob/5f31e86e0e8578377fa7d5aeb9631bbb2d35ef1e/src/consts.nim#L5
         'Authorization': (
         'Authorization': (
             "Bearer AAAAAAAAAAAAAAAAAAAAAPYXBAAAAAAACLXUNDekMxqa8h%2F40K4moUkGsoc%3DTYfbDKb"
             "Bearer AAAAAAAAAAAAAAAAAAAAAPYXBAAAAAAACLXUNDekMxqa8h%2F40K4moUkGsoc%3DTYfbDKb"