Closed teammakdi closed 9 months ago
Works with raw got
import got from 'got';
async function main() {
try {
const response = await got('https://datadeliver.net/ads.txt');
console.log(response.body);
} catch (error) {
console.log(error);
}
}
main()
@B4nan can we release this?
This is currently in testing, as we need to also integrate it in crawlee before you can use it! If you're manually using it in your project, you'll need to jump to ESM (and import the module via import { gotScraping } from 'got-scraping'
/ import()
)
Urls with invalid charset such as
https://datadeliver.net/ads.txt has set
uft-8
instead ofutf-8
results in errorIt works fine on curl and browser
It is expected to have such error or we can skip such checks?