Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- from bs4 import BeautifulSoup
- def trade_spider(max_pages):
- page = 1
- while page <= max_pages:
- url = 'https://buckysroom.org/trades.search.php?page=' + str(page)
- source_code = requests.get(url)
- plain_text = source_code.text
- soup = BeautifulSoup(plain_text)
- for link in soup.findAll('a', {'class': 'item-name'}):
- href = "http://buckysroom.org" + link.get('href')
- title = link.string
- print(href)
- print(title)
- page += 1
- trade_spider(1)
Advertisement
Add Comment
Please, Sign In to add comment