Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1493

Cant use 'axios.post' method

$
0
0

I was scrapping a instagram downloader website using post method but it is showing >>> **cause: Error: write EPROTO 9C3B0000:error:0A000410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:c:\ws\deps\openssl\openssl\ssl\record\rec_layer_s3.c:1605:SSL alert number 40

  at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16) {errno: -4046,code: 'EPROTO',syscall: 'write'

**Idk why , if anybody knows how to solve this, please answer!

my code:

const axios = require('axios');const cheerio = require('cheerio');const qs = require('qs')require('dotenv').config('./env')async function instadl() {    const url = 'https://www.instagram.com/reel/C9hMJQlo859/?utm_source=ig_web_copy_link'    const path = 'https://v3.saveig.app/api/ajaxSearch'    const userName = process.env.BRIGHT_USERNAME;    const passWord = process.env.BRIGHT_PASSWORD;    const port = 22225;    const sessionId = (10000000 * Math.random()) | 0    const u = userName + - +'session'+ - + sessionId    const options = {        q: url,        t: 'media',        lang: 'en',    }    const headers = {        auth: {            username : u,            password : passWord        },        host: 'brd.superproxy.io',        port: port,        rejectUnauthorized: false    }    const response = await axios.post(path , qs.stringify(options) ,  {headers})    const $ = cheerio.load(response.data)    const a = $('#download-result > ul > li > div > div.download-items__btn > a').attr('href')    console.log({a})}instadl()

a solution for this problem


Viewing all articles
Browse latest Browse all 1493

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>