Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- from bs4 import BeautifulSoup
- from pushbullet import Pushbullet
- pb = Pushbullet('KEY HERE')
- URL = 'https://www.komplett.dk/search?q=3090'
- page = requests.get(URL)
- soup = BeautifulSoup(page.content, 'html.parser')
- allItems = soup.find_all(class_='product-list-item')
- for item in allItems:
- StockStatus = item.find_all(class_='stockstatus-stock-details')
- if StockStatus:
- ItemInfo = item.find(class_='product-link image-container')
- ItemLink = 'https://www.komplett.dk' + ItemInfo['href']
- print(ItemInfo['title'] + ' er på lager')
- print(ItemLink)
- push = pb.push_link(ItemInfo['title'], ItemLink)
Add Comment
Please, Sign In to add comment