node-ainzfb-new 1.6.2819-test → 1.6.2823-test
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/src/getUserID.js +1 -1
- package/utils.js +6 -8
package/package.json
CHANGED
package/src/getUserID.js
CHANGED
@@ -43,7 +43,7 @@ module.exports = function (defaultFuncs, api, ctx) {
|
|
43
43
|
};
|
44
44
|
|
45
45
|
defaultFuncs
|
46
|
-
.
|
46
|
+
.get("https://www.facebook.com/ajax/typeahead/search.php", ctx.jar, form)
|
47
47
|
.then(utils.parseAndCheckLogin(ctx, defaultFuncs))
|
48
48
|
.then(function (resData) {
|
49
49
|
if (resData.error) throw resData;
|
package/utils.js
CHANGED
@@ -22,8 +22,8 @@ function getHeaders(url, options, ctx, customHeader) {
|
|
22
22
|
Origin: "https://www.facebook.com",
|
23
23
|
"User-Agent": options.userAgent,
|
24
24
|
Connection: "keep-alive",
|
25
|
-
"sec-fetch-site": 'same-origin',
|
26
|
-
"sec-fetch-mode": 'cors'
|
25
|
+
//"sec-fetch-site": 'same-origin',
|
26
|
+
//"sec-fetch-mode": 'cors'
|
27
27
|
};
|
28
28
|
if (customHeader) Object.assign(headers, customHeader);
|
29
29
|
|
@@ -61,7 +61,7 @@ function get(url, jar, qs, options, ctx) {
|
|
61
61
|
});
|
62
62
|
}
|
63
63
|
|
64
|
-
function getv2(url, jar, qs, options, ctx) {
|
64
|
+
/*function getv2(url, jar, qs, options, ctx) {
|
65
65
|
// I'm still confused about this
|
66
66
|
if (getType(qs) === "Object")
|
67
67
|
for (var prop in qs)
|
@@ -79,7 +79,7 @@ function getv2(url, jar, qs, options, ctx) {
|
|
79
79
|
return request(op).then(function(res) {
|
80
80
|
return res;
|
81
81
|
});
|
82
|
-
}
|
82
|
+
}*/
|
83
83
|
|
84
84
|
function post(url, jar, form, options, ctx, customHeader) {
|
85
85
|
let headers = getHeaders(url, options);
|
@@ -99,7 +99,7 @@ function post(url, jar, form, options, ctx, customHeader) {
|
|
99
99
|
});
|
100
100
|
}
|
101
101
|
|
102
|
-
function postv2(url, jar, form, options, ctx, customHeader) {
|
102
|
+
/*function postv2(url, jar, form, options, ctx, customHeader) {
|
103
103
|
let headers = getHeaders(url, options);
|
104
104
|
headers['sec-fetch-site'] = 'same-origin';
|
105
105
|
var op = {
|
@@ -115,7 +115,7 @@ function postv2(url, jar, form, options, ctx, customHeader) {
|
|
115
115
|
return request(op).then(function(res) {
|
116
116
|
return res;
|
117
117
|
});
|
118
|
-
}
|
118
|
+
}*/
|
119
119
|
|
120
120
|
function postFormData(url, jar, form, qs, options, ctx) {
|
121
121
|
var headers = getHeaders(url, options, ctx);
|
@@ -1245,8 +1245,6 @@ module.exports = {
|
|
1245
1245
|
isReadableStream:isReadableStream,
|
1246
1246
|
get,
|
1247
1247
|
post,
|
1248
|
-
getv2,
|
1249
|
-
postv2,
|
1250
1248
|
postFormData:postFormData,
|
1251
1249
|
generateThreadingID:generateThreadingID,
|
1252
1250
|
generateOfflineThreadingID:generateOfflineThreadingID,
|