Web_Crawler
来源:互联网 发布:子弹 知乎 编辑:程序博客网 时间:2024/06/16 02:53
import requestsfrom bs4 import BeautifulSoupdef trade_spider(max_page): page = 1 i = 0 while page <= max_page: url = 'https://www.thenewboston.com/search.php?type=0&sort=reputation&page=' + str(page) source_code = requests.get(url) plain_text = source_code.text soup = BeautifulSoup(plain_text) for link in soup.findAll('a',{'class':'desc-title'}): href = 'https://www.thenewboston.com'+ link.get('href') title = link.string print(title) print(href) i += 1 print('\n') page += 1 print(i)trade_spider(5)
0 0
- Web_Crawler
- download_images_from_Internet
- Android自定义通知布局Notification,点击Notification导航切换回原Activity
- UVa #1252 Twenty Questions (例题9-16)
- Contiki学习笔记:目录
- download_file_from_web
- Web_Crawler
- 多个TextView同时实现走马灯效果
- contiki与ucos
- Dropping Balls
- pat1052 Linked List Sorting
- Swift UI专项训练2 本地化及自动布局
- hdu 1754(线段树)
- QML处理xml---查询含命名空间的节点
- 年轻