Closed Shuvadip-Ghosh closed 1 year ago
When you do import { META } from ...
in JS, you're doing the same as:
const { META } = require(...) // or await import() in ESM
// or without destructuring:
const META = require(...).META
Therefore, in Python the import would look as
from javascript import require
Meta = require("@consumet/extensions").META
anilist = Meta.Anilist()
print(anilist.fetchAnimeInfo(id))
Thank You it worked but the type printed is <class 'javascript.proxy.Proxy'> how to convert it into a dictionary and I want to use
console.dir(data, {'maxArrayLength': null});
instead of
console.log(data);
so that it print the full array and not print ". . .120 more rows"
Do fetchAnimeInfo(id).valueOf() to get a native object
I am getting this error sometimes
Call to 'fetchAnimeInfo' timed out. Increase the timeout by setting the `timeout` keyword argument.
Can You tell me is this because of js or Python and its solution
That error is because the JS code has returned a Promise but did not resolve in a few seconds. You can try and increase the timeout with fetchAnimeInfo(id, timeout=9000)
The timeout is in milliseconds right??
This is the Javascript code I want to write in Python
This is what I have written in Python till now
This is the error I get
Thanks to anyone who would help me do this.