Closed awolad closed 2 years ago
Quizlet has a anti-bot firewall setup (sort of like CloudFlare). The only way I could really suggest fixing it is getting a proxy.
@aboutDavid Thanks for your reply. Could you please give me an example?
@aboutDavid Thanks for your reply. Could you please give me an example?
Sorry, I don't really use proxies, but here is something I threw together
const quizlet = require("quizlet-fetcher")
const fetch = require("node-fetch-with-proxy");
fetch("https://quizlet.com/...")
.then(res => res.text())
.then(html => {
var flashcard = quizlet(html)
// do something with "flashcard"
});
Edit: forgot one thing: You need to set your proxy
# UNIX-based operating systems
export HTTP_PROXY=http://your.proxy:8888
# Windows
set HTTP_PROXY=http://your.proxy:8888
@aboutDavid I'll try it, thanks.
Let me know if something is not working as intended
It's working locally but getting an error when using it inside AWS lambda.
Failed to fetch the quizlet cards. Status code: 403