Search Not working
had to apply this patch
diff --git a/node_modules/wikipedia/dist/request.js b/node_modules/wikipedia/dist/request.js
index 7076dc2..1216b80 100644
--- a/node_modules/wikipedia/dist/request.js
+++ b/node_modules/wikipedia/dist/request.js
@@ -11,6 +11,7 @@ USER_AGENT = 'wikipedia (https://github.com/dopecodez/Wikipedia/)';
async function callAPI(url) {
const options = {
headers: {
+ "User-Agent": USER_AGENT,
"Api-User-Agent": USER_AGENT,
},
};
which version are you using? can you share the issue you are recieving?
i dont have the error message anymore sorry .. but basically it happened on latest version and every other version .. when using .search .. when i looked through the code i think i noticed that the search didnt use the legacy api or something along those lines
I encounter the same issue whenever trying to call wikipedia.summary(). The error looks like this:
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | exports.citationError = exports.pdfError = exports.fcError = exports.eventsError = exports.mediaError = exports.relatedError = exports.introError = exports.preloadError = exports.infoboxError = exports.coordinatesError = exports.geoSearchError = exports.linksError = exports.categoriesError = exports.contentError = exports.htmlError = exports.imageError = exports.summaryError = exports.pageError = exports.autocompletionsError = exports.searchError = exports.wikiError = void 0;
4 | class wikiError extends Error {
5 | constructor(message, code) {
6 | super(message);
^
summaryError: summaryError: wikiError: AxiosError: Request failed with status code 403
code: undefined,
Applying the patch mentioned above made the issue go away for me.
Same error (AxiosError: Request failed with status code 403). If I apply the proposed fix, it works. Can this be merged and released soon? @dopecodez