Used to scrape McDonald's PeopleStuff for MySchedule

Created from templates made available by Stagehand under a BSD-style license.

Usage

A simple usage example:

import 'package:mcdonalds_scraper/mcdonalds_scraper.dart';
import 'dart:io';

Future<Map<String, String>> getCredentials() async {
  var config = File('credentials.txt');
  var contents;

  // Put each line of the file into its own string.
  contents = await config.readAsLines();
  
  return {"employeeId": contents[0], "password": contents[1]};
}

main() async {

  Map<String, String> creds = await getCredentials();

  var scraper = Scraper();
  await scraper.login(creds["employeeId"], creds["password"]);
  var htmlData = await scraper.scrapeHtml();
  var allPersonData = await scraper.extractPersonData(htmlData);
  var taskData = await scraper.extractTaskData(htmlData, DateTime.parse("2019-08-10 20:18:04Z"));
  var personData = scraper.extractSinglePersonData(allPersonData, creds["employeeId"]);
}

Features and bugs

Please file feature requests and bugs at the issue tracker.

Libraries

mcdonalds_scraper
Support for doing something awesome. [...]