antonio-nicolau / chaleno

A Dart package to web scraping data from websites easily and faster using less code lines.
MIT License
34 stars 12 forks source link

Chaleno [ Exception ]: XMLHttpRequest error. #7

Open jeff9315 opened 2 years ago

jeff9315 commented 2 years ago

@antonio-nicolau ... I just started trying your webscraper out. It looks like exactly what I want. however, this is what I put in and the error I got ... Any ideas?

class _HomePageState extends State<HomePage> {
  String? header, subscribeCount, img;

  void scrapData() async {
    print('11111');
    var parser = await Chaleno().load('https://example.com');
    print('2222');
    Result result = parser!.getElementById('id');
    print(result.text);

And I got these messages

11111 Chaleno [ Exception ]: XMLHttpRequest error. 2222 null

Shiba-Kar commented 1 year ago

facing the same error !!

wahyuhidayat-dev commented 1 year ago

Chaleno [ Exception ]: XMLHttpRequest error. https://webscraper.io/test-sites/e-commerce/allinone/computers/laptops

me too same error

jeff9315 commented 1 year ago

It's been awhile since I had that problem. I've resolved it but I'm not positive how.

Make sure you're using Chanleno V 0.0.6 and that Flutter and Dart are relatively up-to-date. Mine has been running successfully in DOS for close to a year now. I'm running this from DOS rather than from the web. A previous post said web problems related to CORS may be an issue.

Post your code and maybe I can see something. And tell us whether you're running from web, DOS, Android, IOS.

It doesn't look like the author has either answered questions here or published any updates since Jan 2022.