update endpoints
This commit is contained in:
@@ -112,7 +112,7 @@
|
||||
metadata: { featureSwitches: [] },
|
||||
};
|
||||
},
|
||||
68339: (e) => {
|
||||
39406: (e) => {
|
||||
e.exports = {
|
||||
queryId: "pMbW6Y4LuS5MzlSOEqERJQ",
|
||||
operationName: "BirdwatchFetchAuthenticatedUserProfile",
|
||||
@@ -328,7 +328,7 @@
|
||||
E = a.n(T),
|
||||
C = a(65655),
|
||||
O = a.n(C),
|
||||
G = a(68339),
|
||||
G = a(39406),
|
||||
D = a.n(G),
|
||||
R = a(5963),
|
||||
Z = a.n(R),
|
||||
@@ -533,4 +533,4 @@
|
||||
},
|
||||
},
|
||||
]);
|
||||
//# sourceMappingURL=https://ton.local.twitter.com/responsive-web-internal/sourcemaps/client-web/endpoints.Birdwatch.b149873a.js.map
|
||||
//# sourceMappingURL=https://ton.local.twitter.com/responsive-web-internal/sourcemaps/client-web/endpoints.Birdwatch.22fcfb6a.js.map
|
||||
@@ -1,38 +0,0 @@
|
||||
"use strict";
|
||||
(self.webpackChunk_twitter_responsive_web =
|
||||
self.webpackChunk_twitter_responsive_web || []).push([
|
||||
["endpoints.KeyRegistry"],
|
||||
{
|
||||
98420: (e, t, s) => {
|
||||
s.r(t), s.d(t, { default: () => r });
|
||||
const r = ({ apiClient: e, featureSwitches: t }) => ({
|
||||
register: ({ device_id: s, ...r }) =>
|
||||
e.post(
|
||||
"keyregistry/register",
|
||||
r,
|
||||
{
|
||||
dm_secret_conversations_enabled: t.isTrue(
|
||||
"dm_secret_conversations_enabled"
|
||||
),
|
||||
krs_registration_enabled: t.isTrue("krs_registration_enabled"),
|
||||
},
|
||||
{ "X-Client-UUID": s, "content-type": "application/json" },
|
||||
""
|
||||
),
|
||||
extractPublicKeys: ({ device_id: s, user_id: r }) =>
|
||||
e.get(
|
||||
`keyregistry/extract_public_keys/${r}`,
|
||||
{
|
||||
dm_secret_conversations_enabled: t.isTrue(
|
||||
"dm_secret_conversations_enabled"
|
||||
),
|
||||
krs_registration_enabled: t.isTrue("krs_registration_enabled"),
|
||||
},
|
||||
{ "X-Client-UUID": s },
|
||||
""
|
||||
),
|
||||
});
|
||||
},
|
||||
},
|
||||
]);
|
||||
//# sourceMappingURL=https://ton.local.twitter.com/responsive-web-internal/sourcemaps/client-web/endpoints.KeyRegistry.28dc411a.js.map
|
||||
53
info/endpoints/endpoints.KeyRegistry.c9073cea.js
Normal file
53
info/endpoints/endpoints.KeyRegistry.c9073cea.js
Normal file
@@ -0,0 +1,53 @@
|
||||
"use strict";
|
||||
(self.webpackChunk_twitter_responsive_web =
|
||||
self.webpackChunk_twitter_responsive_web || []).push([
|
||||
["endpoints.KeyRegistry"],
|
||||
{
|
||||
98420: (e, t, s) => {
|
||||
s.r(t), s.d(t, { default: () => i });
|
||||
s(6886), s(67694);
|
||||
const i = ({ apiClient: e, featureSwitches: t }) => ({
|
||||
register: ({ device_id: s, ...i }) =>
|
||||
e.post(
|
||||
"keyregistry/register",
|
||||
i,
|
||||
{
|
||||
dm_secret_conversations_enabled: t.isTrue(
|
||||
"dm_secret_conversations_enabled"
|
||||
),
|
||||
krs_registration_enabled: t.isTrue("krs_registration_enabled"),
|
||||
},
|
||||
{ "X-Client-UUID": s, "content-type": "application/json" },
|
||||
""
|
||||
),
|
||||
extractPublicKeys: (s = []) =>
|
||||
Promise.all(
|
||||
s.map((s) =>
|
||||
e
|
||||
.get(
|
||||
`keyregistry/extract_public_keys/${s}`,
|
||||
{
|
||||
dm_secret_conversations_enabled: t.isTrue(
|
||||
"dm_secret_conversations_enabled"
|
||||
),
|
||||
krs_registration_enabled: t.isTrue(
|
||||
"krs_registration_enabled"
|
||||
),
|
||||
},
|
||||
{},
|
||||
""
|
||||
)
|
||||
.then(({ public_keys: e = [] }) =>
|
||||
e.map(({ identity_key: e, ...t }) => ({
|
||||
user_id: s,
|
||||
identity_key: e,
|
||||
...t,
|
||||
}))
|
||||
)
|
||||
)
|
||||
).then((e) => e.flat()),
|
||||
});
|
||||
},
|
||||
},
|
||||
]);
|
||||
//# sourceMappingURL=https://ton.local.twitter.com/responsive-web-internal/sourcemaps/client-web/endpoints.KeyRegistry.c9073cea.js.map
|
||||
@@ -4,20 +4,25 @@
|
||||
["endpoints.Recommendations"],
|
||||
{
|
||||
40886: (e, t, s) => {
|
||||
s.r(t), s.d(t, { default: () => a });
|
||||
s.r(t), s.d(t, { default: () => c });
|
||||
var n = s(6899),
|
||||
r = s(13239);
|
||||
const i = new n.fK.Entity(
|
||||
"recommendations",
|
||||
{ user: r.Z },
|
||||
{ idAttribute: (e) => e.user.id_str }
|
||||
{
|
||||
idAttribute: (e) => {
|
||||
var t;
|
||||
return null == (t = e.user) ? void 0 : t.id_str;
|
||||
},
|
||||
}
|
||||
);
|
||||
var c = s(6623),
|
||||
var u = s(6623),
|
||||
o = s(55371);
|
||||
const u = (e) => ({ ...o.getGlobalDefaults(e), excluded: [], pc: !0 }),
|
||||
a = ({ apiClient: e, featureSwitches: t }) => ({
|
||||
const a = (e) => ({ ...o.getGlobalDefaults(e), excluded: [], pc: !0 }),
|
||||
c = ({ apiClient: e, featureSwitches: t }) => ({
|
||||
fetch(s, r = {}) {
|
||||
const o = { ...u(t), ...s, ...(0, c.Y)(t) };
|
||||
const o = { ...a(t), ...s, ...(0, u.Y)(t) };
|
||||
return e
|
||||
.get("users/recommendations", o, r)
|
||||
.then((e) => (0, n.Fv)(e, [i]));
|
||||
@@ -26,4 +31,4 @@
|
||||
},
|
||||
},
|
||||
]);
|
||||
//# sourceMappingURL=https://ton.local.twitter.com/responsive-web-internal/sourcemaps/client-web/endpoints.Recommendations.334d35ea.js.map
|
||||
//# sourceMappingURL=https://ton.local.twitter.com/responsive-web-internal/sourcemaps/client-web/endpoints.Recommendations.e61abcea.js.map
|
||||
1232
info/js.json
1232
info/js.json
File diff suppressed because it is too large
Load Diff
@@ -39,10 +39,9 @@ def find_api_script(res: requests.Response) -> str:
|
||||
@param res: response from homepage: https://twitter.com
|
||||
@return: url to api script
|
||||
"""
|
||||
# temp = re.findall('\+"\."\+(\{.*\})\[e\]\+?"a\.js",', res.text)[0]
|
||||
temp = re.findall('\+"\."\+(\{.*\})\[e\]\+?' + '"' + _a + '"', res.text)[0]
|
||||
endpoints = orjson.loads(temp.replace('vendor:', '"vendor":').replace('api:', '"api":'))
|
||||
JS.write_bytes(orjson.dumps(endpoints))
|
||||
JS.write_bytes(orjson.dumps(dict(sorted(endpoints.items()))))
|
||||
js = 'api.' + endpoints['api'] + _a # search for `+"a.js"` in homepage source
|
||||
return f'{_base}/{js}'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user