# How to download the html file of through a browser like Chrome

**URL:** <https://discourse.julialang.org/t/how-to-download-the-html-file-of-through-a-browser-like-chrome/113276>\
**Category:** General Usage\
**Tags:** html\
**Created:** [April 20, 2024, 3:38pm UTC](https://discourse.julialang.org/t/how-to-download-the-html-file-of-through-a-browser-like-chrome/113276 "2024-04-20T15:38:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![programista](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/programista/32/5372_2.png) [@programista](https://discourse.julialang.org/u/programista)\
**Post date:** [April 20, 2024, 3:38pm UTC](https://discourse.julialang.org/t/how-to-download-the-html-file-of-through-a-browser-like-chrome/113276/1 "2024-04-20T15:38:39Z")

</div>

How to download the html file of a website from juli, e.g.: [https://page.com](https://page.com) through a browser like chrom, if the website blocks access to robots. Some package?  
Paul

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [April 20, 2024, 4:09pm UTC](https://discourse.julialang.org/t/how-to-download-the-html-file-of-through-a-browser-like-chrome/113276/2 "2024-04-20T16:09:21Z")

</div>

A package can’t solve this problem. If the website requires some user interaction to proceed, you can’t overcome this.

What you can try: check if there are some cookies set or if you can login/register, so that you don’t need to interact anymore before you get the page. If this is possible the next step would be to send the cookie or to login via your script.

Another possibility would be, if the website in question provides an API exactly for getting content via script.

If you solved the problem of a “user interaction test” then you can check out headless chrome. Here is an example (Windows):

```julia
url = "https://page.com"
chrome_bin = "C:/Program Files/Google/Chrome/Application/chrome.exe"
chrome = `$(chrome_bin) --headless --disable-gpu --dump-dom $(url)`
content = read(chrome,String)

```

Here is a starting point for headless chrome: [https://developer.chrome.com/blog/headless-chrome](https://developer.chrome.com/blog/headless-chrome)

---

<div class="post-metadata">

**Author:** ![programista](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/programista/32/5372_2.png) [@programista](https://discourse.julialang.org/u/programista)\
**Post date:** [April 21, 2024, 4:55am UTC](https://discourse.julialang.org/t/how-to-download-the-html-file-of-through-a-browser-like-chrome/113276/3 "2024-04-21T04:55:12Z")

</div>

Thanks ! No user interaction is required. The site does not send full html when I query with Julia, it only responds to Chrome, Firefox, etc.  
Paul

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [April 21, 2024, 8:31am UTC](https://discourse.julialang.org/t/how-to-download-the-html-file-of-through-a-browser-like-chrome/113276/4 "2024-04-21T08:31:35Z")

</div>

So, there is probably some JavaScript filling the content. Headless chrome is the way to go.
