帮我用Python写一个蜘蛛纸牌
时间: 2024-03-06 16:40:35 浏览: 150
蜘蛛纸牌游戏-Python
5星 · 资源好评率100%
好的,以下是Python爬虫蜘蛛纸牌的代码:
```python
import requests
from bs4 import BeautifulSoup
url = 'https://www.spider-card.com/'
response = requests.get(url)
soup = BeautifulSoup(response.text, 'html.parser')
cards = soup.select('img.card_img')
for card in cards:
print(card['alt'])
```
运行以上代码即可爬取蜘蛛纸牌网站上的所有纸牌名称。
阅读全文