We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71be9a5 commit 1837331Copy full SHA for 1837331
src/factory/casper.ts
@@ -16,7 +16,17 @@ export const casperParser = async (
16
default: {
17
let uri = nft.uri;
18
if (uri) {
19
- const res = (await axios(nft.uri));
+ let res;
20
+ try {
21
+ res = await axios(nft.uri);
22
+ } catch (error) {
23
+ res = await axios.get(nft.uri, {
24
+ headers: {
25
+ "User-Agent":
26
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36",
27
+ },
28
+ });
29
+ }
30
const contentType = res.headers["content-type"];
31
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = "1";
32
0 commit comments