[arcalive] allow overriding default User-Agent header (#7556)
This commit is contained in:
@@ -663,6 +663,7 @@ Type
|
||||
Default
|
||||
* ``"gallery-dl/VERSION"``: ``[Danbooru]``, ``mangadex``, ``weasyl``
|
||||
* ``"gallery-dl/VERSION (by mikf)"``: ``[E621]``
|
||||
* ``"net.umanle.arca.android.playstore/0.9.75"``: ``arcalive``
|
||||
* ``"Patreon/72.2.28 (Android; Android 14; Scale/2.10)"``: ``patreon``
|
||||
* ``"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/LATEST.0.0.0 Safari/537.36"``: ``instagram``
|
||||
* ``"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:LATEST) Gecko/20100101 Firefox/LATEST"``: otherwise
|
||||
|
||||
@@ -17,6 +17,7 @@ class ArcaliveExtractor(Extractor):
|
||||
"""Base class for Arca.live extractors"""
|
||||
category = "arcalive"
|
||||
root = "https://arca.live"
|
||||
useragent = "net.umanle.arca.android.playstore/0.9.75"
|
||||
request_interval = (0.5, 1.5)
|
||||
|
||||
def _init(self):
|
||||
@@ -149,9 +150,7 @@ class ArcaliveAPI():
|
||||
self.log = extractor.log
|
||||
self.root = extractor.root + "/api/app"
|
||||
|
||||
headers = extractor.session.headers
|
||||
headers["User-Agent"] = "net.umanle.arca.android.playstore/0.9.75"
|
||||
headers["X-Device-Token"] = util.generate_token(64)
|
||||
extractor.session.headers["X-Device-Token"] = util.generate_token(64)
|
||||
|
||||
def board(self, board_slug, params):
|
||||
endpoint = "/list/channel/" + board_slug
|
||||
|
||||
Reference in New Issue
Block a user