GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Source-Code-from-Tutorials/Python/27_python.py at master · aizazk/Source-Code-from-Tutorials Expand file tree/ Copy path27_python.pyMore file actions 31 lines (26 loc) · 911 Bytes / Copy path27_python.pyFile metadata and controls31 lines (26 loc) · 911 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 import requests from b4 import BeautifulSoup def trade_spider(max_pages): page = 1 while page <= max_pages: url = 'https://buckysroom.org/trade/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 = "https://buckysroom.org" + link.get('href') title = link.string # print(href) # print(title) get_single_item_data(href) page += 1 def get_single_item_data(item_url): source_code = requests.get(item_url) plain_text = source_code.text soup = BeautifulSoup(plain_text) for item_name in soup.findAll('div', {'class': 'i-name'}): print(item_name.string) for link in soup.findAll('a'): href = "https://buckysroom.org" + link.get('href') print(href) trade_spider(3) |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |