-
Notifications
You must be signed in to change notification settings - Fork 3
/
TestMain.py
42 lines (30 loc) · 1.21 KB
/
TestMain.py
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
32
33
34
35
36
37
38
39
40
41
42
"""
table = soup.find(class_="cntBoxContent")
sales = table.find_all(class_="bundle-container-outer bundle-preview giveaway")
bundles = table.find_all(class_="bundle-container-outer bundle-preview bundle")
links = table.find_all(class_="lg")
gamelist = soup.find_all('a', class_='lg')
prettylist = []
count = 0
for game in gamelist:
count += 1
prettylist.append(game)
#print(gamelist)
#print(prettylist)
"""
"""
MY OLD CODE
import requests
from bs4 import BeautifulSoup
pricepage = "https://isthereanydeal.com/#/"
page = requests.get(pricepage) #Request The Page
soup = BeautifulSoup(page.content, 'html.parser') #Soup The Page
gamelist = [] #Create Empty List
for link in soup.find_all('a', class_='lg'): #Find Links
gamelist.append(link.get('href')) #Get Hrefs
gamelist = list(dict.fromkeys(gamelist)) #Remove Duplicates
print(gamelist)
#sales = table.find_all(class_="bundle-container-outer bundle-preview giveaway")
#bundles = table.find_all(class_="bundle-container-outer bundle-preview bundle")
"""
# RUN pip3 freeze > requirements.txt IN CONSOLE TO UPDATE REQUIREMENTS TEXT