This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Don't print a new line at the start of the prompt | |
add_newline = false | |
# Make prompt a single line instead of two lines | |
[line_break] | |
disabled = true | |
# Replace the "❯" symbol in the prompt with "➜" | |
[character] # The name of the module we are configuring is "character" | |
success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from glob import glob | |
from bs4 import BeautifulSoup | |
import pandas as pd | |
from datetime import datetime | |
from time import sleep | |
# http://www.networkinghowtos.com/howto/common-user-agent-list/ | |
HEADERS = ({'User-Agent': | |
'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# product title | |
title = soup.find(id='productTitle').get_text().strip() | |
# to prevent script from crashing when there isn't a price for the product | |
try: | |
price = float(soup.find(id='priceblock_ourprice').get_text().replace('.', '').replace('€', '').replace(',', '.').strip()) | |
except: | |
price = '' | |
# review score |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tracker_log = pd.DataFrame() # later on, this will be your previous search history file | |
now = datetime.now().strftime('%Y-%m-%d %Hh%Mm') | |
log = pd.DataFrame({'date': now.replace('h',':').replace('m',''), | |
'code': prod_tracker.code[x], # this code comes from the TRACKER_PRODUCTS file | |
'url': url, | |
'title': title, | |
'buy_below': prod_tracker.buy_below[x], # this price comes from the TRACKER_PRODUCTS file | |
'price': price, | |
'stock': stock, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from glob import glob | |
from bs4 import BeautifulSoup | |
import pandas as pd | |
from datetime import datetime | |
from time import sleep | |
# http://www.networkinghowtos.com/howto/common-user-agent-list/ | |
HEADERS = ({'User-Agent': | |
'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36', |