# \[ANN\] Harbest.jl - Simple web scraping with Julia

**URL:** <https://discourse.julialang.org/t/ann-harbest-jl-simple-web-scraping-with-julia/91821>\
**Category:** Package Announcements\
**Created:** [December 18, 2022, 10:44pm UTC](https://discourse.julialang.org/t/ann-harbest-jl-simple-web-scraping-with-julia/91821 "2022-12-18T22:44:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jose\_Diaz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jose_diaz/32/43750_2.png) [@Jose\_Diaz](https://discourse.julialang.org/u/Jose_Diaz)\
**Post date:** [December 18, 2022, 10:44pm UTC](https://discourse.julialang.org/t/ann-harbest-jl-simple-web-scraping-with-julia/91821/1 "2022-12-18T22:44:01Z")

</div>

Hello people!

I’m making a package, mostly as a personal tool but I just publish it.

It’s kind of a port of Rvest from R, but it will extend the functionality way more, making new and cool functions.

Currently, I see it mostly as sugar code in the sense that combines the funcionality of HTTP, Cascadia and Gumbo in a different syntax.

You can see the documentation [here](https://github.com/jdiaz97/Harbest.jl)

You can install it using `Pkg.add("Harbest")`

I’m gonna be making better documentation, better and new functions very soon!

---

<div class="post-metadata">

**Author:** ![rmsmsgood](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rmsmsgood/32/20544_2.png) [@rmsmsgood](https://discourse.julialang.org/u/rmsmsgood)\
**Post date:** [December 19, 2022, 4:33am UTC](https://discourse.julialang.org/t/ann-harbest-jl-simple-web-scraping-with-julia/91821/2 "2022-12-19T04:33:42Z")

</div>

Awesome. Is there any possibility to download images at the page automatically, in future?

---

<div class="post-metadata">

**Author:** ![Jose\_Diaz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jose_diaz/32/43750_2.png) [@Jose\_Diaz](https://discourse.julialang.org/u/Jose_Diaz)\
**Post date:** [December 22, 2022, 7:45am UTC](https://discourse.julialang.org/t/ann-harbest-jl-simple-web-scraping-with-julia/91821/3 "2022-12-22T07:45:52Z")

</div>

Yes!  
I’ll be thinking on a nice implementation to do that.  
Thanks!

---

<div class="post-metadata">

**Author:** ![Albert\_Zevelev](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/albert_zevelev/32/11844_2.png) [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Post date:** [December 24, 2022, 1:02am UTC](https://discourse.julialang.org/t/ann-harbest-jl-simple-web-scraping-with-julia/91821/4 "2022-12-24T01:02:25Z")

</div>

Can your package pulls ski resort data?  
I tried here:

> [@Pull data from websites in Julia](https://discourse.julialang.org/t/pull-data-from-websites-in-julia/91112):
>
> As ski resorts begin to open, they update data on their websites throughout the day, every day. Two factors skiiers care about are: (1) # trails currently open, (2) current Snow base Each resort website posts this info: [Park City trails](https://www.parkcitymountain.com/the-mountain/mountain-conditions/terrain-and-lift-status.aspx): [image] [Park City snow](https://www.parkcitymountain.com/the-mountain/mountain-conditions/snow-and-weather-report.aspx): [image] [Vail Trails](https://www.vail.com/the-mountain/mountain-conditions/terrain-and-lift-status.aspx):[image] [Vail Snow](https://www.vail.com/the-mountain/mountain-conditions/snow-and-weather-report.aspx): [image] [Whistler Trails](https://www.whistlerblackcomb.com/the-mountain/mountain-conditions/terrain-and-lift-status.aspx): [image] [Whistler Snow](https://www.whistlerblackcomb.com/the-mountain/mountain-conditions/snow-and-weather-report.aspx): [image] Can I automatically pull this data from the links above using Julia? ([skicentral.com](https://www.skicentral.com/openareas-skireport.html#south) does this, but not particularly well & I’d like …

---

<div class="post-metadata">

**Author:** ![Jose\_Diaz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jose_diaz/32/43750_2.png) [@Jose\_Diaz](https://discourse.julialang.org/u/Jose_Diaz)\
**Post date:** [December 24, 2022, 2:07am UTC](https://discourse.julialang.org/t/ann-harbest-jl-simple-web-scraping-with-julia/91821/5 "2022-12-24T02:07:03Z")

</div>

Yes! Easily

For example, with the following code, you’ll get the lifts, terrain and trails open (from the first link you sent)

```julia
using Harbest

html = read_html("https://www.parkcitymountain.com/the-mountain/mountain-conditions/terrain-and-lift-status.aspx")

data = html_elements(html, ".c118__number1--v1")

# data[1] is the amount of lifts, data[2] and data[3] are the rest
lifts_open = html_text3(data[1]) ## "38"

```

---

<div class="post-metadata">

**Author:** ![avik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/avik/32/17_2.png) [@avik](https://discourse.julialang.org/u/avik)\
**Post date:** [December 25, 2022, 7:06pm UTC](https://discourse.julialang.org/t/ann-harbest-jl-simple-web-scraping-with-julia/91821/6 "2022-12-25T19:06:20Z")

</div>

Nice. Let me know if you find any issues with Cascadia that blocks you. I’ve long thought that some syntax sugar on Cascadia/Gumbo would be useful. I’ve considered extending Cascadia with it, but happy to see it in a different package.

Regards

Avik
