README.md
# scrapbook
Gleam package for the Erlang target that can scrape parts of Facebook.
**Currently, this package only supports scraping single events and events from a page (list of events or all event details).**
[](https://hex.pm/packages/scrapbook)
[](https://hex.pm/packages/scrapbook)
[](https://hexdocs.pm/scrapbook/)

```sh
gleam add scrapbook
```
```gleam
import gleam/io
import scrapbook/event
import scrapbook/page
pub fn main() {
let event =
event.scrape_from_url(
"https://www.facebook.com/events/1137956700212933/1137956706879599/",
)
let _ = io.debug(event)
let events = page.scrape_upcoming_events_from_name("CodeSyncGlobal")
let _ = io.debug(events)
}
```
Further documentation can be found at <https://hexdocs.pm/scrapbook>.
All contributions are welcome. If you have any questions, please create an issue in the repository.
## Other information
Facebook's terms of service prohibit automated scraping of their site. Use this package at your own risk.
Read more: [Automated Data Collection Terms](https://www.facebook.com/legal/automated_data_collection_terms)
## Acknowledgements
- [@francescov1](https://github.com/francescov1) for the [facebook-event-scraper](https://github.com/francescov1/facebook-event-scraper) (MIT) TypeScript library, which was an inspiration and the basis for the event scraping logic.