12345678910111213 |
- import requests
- from bs4 import BeautifulSoup
- req = requests.get('https://www.coingecko.com/zh/%E6%95%B0%E5%AD%97%E8%B4%A7%E5%B8%81/bikerush')
- soup = BeautifulSoup(req.content, 'html.parser')
- soup.prettify()
- anchors = soup.findAll('div', class_='tw-text-gray-500 text-normal dark:tw-text-white dark:tw-text-opacity-60 tw-mb-3')
- print(len(anchors))
- res = anchors[0]
- res = res.children
- for r in res:
- print(type(r))
- print(r)
|