# Web parsing in HuggingChat

**URL:** <https://discuss.huggingface.co/t/web-parsing-in-huggingchat/58049>\
**Category:** Intermediate\
**Created:** [October 10, 2023, 2:58pm UTC](https://discuss.huggingface.co/t/web-parsing-in-huggingchat/58049 "2023-10-10T14:58:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alkibijad](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@alkibijad](https://discuss.huggingface.co/u/alkibijad)\
**Post date:** [October 10, 2023, 2:58pm UTC](https://discuss.huggingface.co/t/web-parsing-in-huggingchat/58049/1 "2023-10-10T14:58:14Z")

</div>

HuggingChat has access to web search, which is great.

However, ([the way it parses webpages isn’t great](https://github.com/huggingface/chat-ui/blob/main/src/lib/server/websearch/parseWeb.ts#L3)). AFAIU, it looks only at `<p>` tags.

This causes the model to fail at some tasks, because of the parser’s output. Does anyone have an idea of a better way to parse webpages? Any ideas how OpenAI is doing it?  
If we just include additional tags, e.g. `<span>, <div>, <li>`… we can end up with a loooot of text.

Here’s an example:

- webpage: [https://www.zara.com/us/en/viscose-blend-knit-polo-p06674305.html#:~:text=,90%20USD](https://www.zara.com/us/en/viscose-blend-knit-polo-p06674305.html#:~:text=,90%20USD)

The price of the item is $59.90.

- ChatGPT’s response - it gets the price correctly:

```auto
The price of the VISCOSE BLEND KNIT POLO SHIRT on the provided link is $59.90 USD​1​.
Is there anything else you would like to know?

```

- HuggingChat’s response - it fails because it can’t extract the price as it’s inside `<span>`  
 ![image](https://us1.discourse-cdn.com/hellohellohello/original/3X/c/9/c9cdb86d4086741bcc962a3840297a56f6d85535.jpeg)

Note that the model ends up hallucinating, none of the links have $29.90 price.
