- sloth_datetime
- DateTime extension:
- secondsSinceEpoch
- DateTime extension:
- slot_link_crawler
With dart:
$ dart pub add sloth
With Flutter:
$ flutter pub add sloth
Import the package
import 'package:sloth/sloth.dart';
// get secondsSinceEpoch
int seconds = DateTime.now().secondsSinceEpoch;
print("Seconds since epoch $seconds s");
final crawler = SlothLinkCrawler(
// Domain to crawl
baseUrl: 'https://example.com',
// if true only urls of the domain will get listed
onlyInternalDomainLinks: true,
// if true some debugging information will be displayed in the console
debugMode: true,
// set the duration between crawl calls
duration: const Duration(seconds: 2),
// set a custom user agent
userAgent: 'SlothLinkCrawler');
// List of all crawled urls
List<String> result = await crawler.crawl();