萌社区 二次元同好交流社区
技术交流

Python爬虫入门教程

爬虫入门其实很简单,只需要掌握 requests + BeautifulSoup 即可。

```python
import requests
from bs4 import BeautifulSoup

url = 'https://example.com'
r = requests.get(url)
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
```

有问题的可以留言问我。

回复 (0)

登录后即可回复。