# Download files from websites using HTTP.jl, Gumbo.jl and Cascadia.jl

**URL:** <https://discourse.julialang.org/t/download-files-from-websites-using-http-jl-gumbo-jl-and-cascadia-jl/20442>\
**Category:** General Usage\
**Tags:** question\
**Created:** [February 4, 2019, 6:41pm UTC](https://discourse.julialang.org/t/download-files-from-websites-using-http-jl-gumbo-jl-and-cascadia-jl/20442 "2019-02-04T18:41:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![guilhermebodin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/guilhermebodin/32/6982_2.png) [@guilhermebodin](https://discourse.julialang.org/u/guilhermebodin)\
**Post date:** [February 4, 2019, 6:41pm UTC](https://discourse.julialang.org/t/download-files-from-websites-using-http-jl-gumbo-jl-and-cascadia-jl/20442/1 "2019-02-04T18:41:44Z")

</div>

Hello

I’m trying to download files from different URLs. In this application, every website has a link called “Formulário de Referência”.

Given these two websites

```julia
sites = ["http://www.dynamo.com.br/pt/empresa/dig"
         "http://www.riogestao.com.br/download.php"]

```

I’m trying to download the file that can be accessed when clicking the link “Formulário de Referência”.

When I use HTTP.jl and Gumbo.jl like this

```julia
for site in sites
    r = HTTP.request("GET", site)
    doc = parsehtml(String(r.body))
end

```

Inside `doc` there is link like this

```nohighlight
<a href="/uploads/c570e13449bc0c4035eea186994a6896de1ae4bc.pdf"target="_blank">
    Formulário de Referência
</a>

```

or this

```nohighlight
<a href="download/pdf/Formulario de Referencia.pdf"target="_blank">
<img alt="Documento PDF"height="16"border="0"src="img/icon_pdf.gif"width="20"></img>
    - FORMULÁRIO DE REFERÊNCIA
</a>

```

I would like to know if there is a way of getting the URLs of the download using these packages.  
The URLs would be:

- [http://www.riogestao.com.br/download/pdf/Formulario%20de%20Referencia.pdf](http://www.riogestao.com.br/download/pdf/Formulario%20de%20Referencia.pdf)
- [http://www.dynamo.com.br/uploads/c542dcf85cd96179e80abf109154716a4399e06b.pdf](http://www.dynamo.com.br/uploads/c542dcf85cd96179e80abf109154716a4399e06b.pdf)

Thanks!
