Alir3z4 / Alir3z4/html2text

HTML <picture> Element not returned as image link from srcset

未关闭
#395 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
2.2k
派生
296
PR 合并指标
30 天内没有已合并 PR

描述

The image link from the `srcset` is not returned in the markdown return in the \ html element. I expect it to be returned like if the image src was in the \ html element.

Code snippet example:
```python
import html2text

html = """

Poorly drawn lines comics







This is one of my most favorite recent comics. Comes in print too. I want it for my home.

"""
md = html2text.html2text(html)
print(md)
```

Actual Output:
```
# Poorly drawn lines comics

This is one of my most favorite recent comics. Comes in print too. I want it
for my home.
```

Expected Output:
- includes the image link (though I'm not particular for which one)
- same result as if using the \ html element
```
# Poorly drawn lines comics

![](https://pbs.twimg.com/media/FbVo3fiUcAAYytB?format=jpg&name=small)

This is one of my most favorite recent comics. Comes in print too. I want it
for my home.
```

- Version by `html2text --version` 2020.1.16
- Python version `python --version` 3.9.13

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。