[blueskx] add 'api-server' option (#8668)
This commit is contained in:
@@ -1810,6 +1810,22 @@ Description
|
|||||||
Download embedded videos hosted on https://www.blogger.com/
|
Download embedded videos hosted on https://www.blogger.com/
|
||||||
|
|
||||||
|
|
||||||
|
extractor.bluesky.api-server
|
||||||
|
----------------------------
|
||||||
|
Type
|
||||||
|
``string``
|
||||||
|
Default
|
||||||
|
| ``"https://bsky.social"`` if a
|
||||||
|
`username <extractor.*.username & .password_>`__
|
||||||
|
is provided
|
||||||
|
| ``"https://api.bsky.app"`` otherwise
|
||||||
|
Description
|
||||||
|
Server address for API requests.
|
||||||
|
|
||||||
|
Can be used when self-hosting a
|
||||||
|
`PDS <https://github.com/bluesky-social/pds>`__
|
||||||
|
|
||||||
|
|
||||||
extractor.bluesky.include
|
extractor.bluesky.include
|
||||||
-------------------------
|
-------------------------
|
||||||
Type
|
Type
|
||||||
|
|||||||
@@ -171,11 +171,12 @@
|
|||||||
"username": "",
|
"username": "",
|
||||||
"password": "",
|
"password": "",
|
||||||
|
|
||||||
"include" : ["media"],
|
"api-server": null,
|
||||||
"metadata": false,
|
"include" : ["media"],
|
||||||
"quoted" : false,
|
"metadata" : false,
|
||||||
"reposts" : false,
|
"quoted" : false,
|
||||||
"videos" : true,
|
"reposts" : false,
|
||||||
|
"videos" : true,
|
||||||
|
|
||||||
"likes": {
|
"likes": {
|
||||||
"depth" : 0,
|
"depth" : 0,
|
||||||
|
|||||||
@@ -400,7 +400,9 @@ class BlueskyAPI():
|
|||||||
self.headers = {"Accept": "application/json"}
|
self.headers = {"Accept": "application/json"}
|
||||||
|
|
||||||
self.username, self.password = extractor._get_auth_info()
|
self.username, self.password = extractor._get_auth_info()
|
||||||
if self.username:
|
if srv := extractor.config("api-server", False):
|
||||||
|
self.root = srv.rstrip("/")
|
||||||
|
elif self.username:
|
||||||
self.root = "https://bsky.social"
|
self.root = "https://bsky.social"
|
||||||
else:
|
else:
|
||||||
self.root = "https://api.bsky.app"
|
self.root = "https://api.bsky.app"
|
||||||
|
|||||||
Reference in New Issue
Block a user