requests 的作者的新项目 requests-html

2018 年 2 月 28 日
 yangzhezjgs
https://github.com/kennethreitz/requests-html

This library intends to make parsing HTML (e.g. scraping the web) as simple and intuitive as possible.

When using this library you automatically get:

-Full JavaScript support!
-CSS Selectors (a.k.a jQuery-style, thanks to PyQuery).
-XPath Selectors, for the faint at heart.
-Mocked user-agent (like a real web browser).
-Automatic following of redirects.
-Connection – pooling and cookie persistence.
-The Requests experience you know and love, with magical parsing abilities.

对 requests 做了封装,添加了解析 html 的接口,总代码现在是 399 行,还在更新
12275 次点击
所在节点    Python
44 条回复
mYYnSmiTEQWcCwAr
2018 年 2 月 28 日
mark 先 star 为敬
lhx2008
2018 年 2 月 28 日
把 pyquery 和 xpath 弄进来了,还有自动 useragent,是要一统江湖的节奏
co3site
2018 年 2 月 28 日
观望中,先 star
Sanko
2018 年 2 月 28 日
orz
prolic
2018 年 2 月 28 日
star 为敬,beautifulsoup 用着还是不够爽
weiwio
2018 年 2 月 28 日
今天看了一下,原来是新项目,很有希望啊
fyyz
2018 年 2 月 28 日
吊炸天
tuding
2018 年 2 月 28 日
这个作者好腻害,好多牛逼项目
steveway
2018 年 2 月 28 日
看作者就 star 系列
lfzyx
2018 年 2 月 28 日
可以放弃 bs4 了?
CSM
2018 年 2 月 28 日
期待有人封装 aiohttp
sunwei0325
2018 年 2 月 28 日
如果下载和解析分开异步进行就好了
angelshq
2018 年 2 月 28 日
mark
Zzde
2018 年 2 月 28 日
Mark
find456789
2018 年 2 月 28 日
不太明白,这个 库 用来替代谁的?
find456789
2018 年 2 月 28 日
请问这个库 是 requests+bs4 吗
douglarek
2018 年 2 月 28 日
xxx for humans 又来了?没有 xxx 之前莫不是大家都在吃猪食 ?
soulmine
2018 年 2 月 28 日
@find456789 大约看了下 大概类似于 requests+bs4+selenium/phantomjs 不过后面两个现在只是封装了一小部分功能 比如通过 css selector 解析或者执行 js 代码这种
soulmine
2018 年 2 月 28 日
@sunwei0325 你可以自己异步啊 比如用队列什么的
hugo2lee
2018 年 2 月 28 日
Only later versions of Python 3 are supported. 好评

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://v2ex.xtra.eu.org/t/433435

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX