Skip to content

Commit c5526f6

Browse files
authored
Removing unused code
unnecessary lines of code removed.
1 parent 1828a70 commit c5526f6

File tree

2 files changed

+1
-30
lines changed

2 files changed

+1
-30
lines changed

Prices/price_grabber.py

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import datetime
55
import shutil
66
import os
7-
#from archive_files import *
87

98
rarity = {
109
'4b69ff':'Mil-spec',
@@ -53,7 +52,6 @@ def cases(out):
5352
print(' Too Many Requests!')
5453
dic = (str(items_web.content).split('var g_rgAssets')[1].split('{"type":"html","value":"Contains one of the following:"}')[1].split(f',"name":"{case[0]}"')[0].split(',"tradable"')[0])
5554
dic = '['+dic[1:len(dic)]
56-
#print(('https://steamcommunity.com/market/listings/730/'+case[0]).replace(' ','%20'),dic)
5755
dic = ast.literal_eval(dic)
5856
dic = dic[0:len(dic)-3]
5957
for i in range(0,len(dic)):
@@ -106,7 +104,6 @@ def extract(html):
106104
return [stattrak,wear,price]
107105

108106

109-
110107
def csgostash_price(ids,skin):
111108
remove = ['(',')',"'",'.','<','>']
112109
prices = []
@@ -157,7 +154,6 @@ def csgostash_price(ids,skin):
157154
avg_prices = [avg_nonstattrak,avg_stattrak]
158155
except Exception as e:
159156
print(converted_skin,e)
160-
161157
id_file.close()
162158
return avg_prices
163159

@@ -177,7 +173,6 @@ def skin_prices(ids,inp,out):
177173
for all_wear in all_wears:
178174
count = iline.count(all_wear)
179175
amount = f"{amount} '{all_wear}':{count},"
180-
#print(f'{count} {all_wear} in {case}')
181176
amount = ast.literal_eval((amount+'}').replace(',}','}'))
182177
for skin_list in ast.literal_eval(cases[2]):
183178
wear = skin_list[1]
@@ -203,19 +198,6 @@ def archive(files):
203198
shutil.copy(f'{file}', f'archive/{add_date(file)}')
204199
os.rename(str(file), f'current/{file}')
205200

206-
def run_parallel(functions):
207-
from multiprocessing import Process
208-
209-
210-
211-
processes = []
212-
for function in functions:
213-
proc = Process(target=function)
214-
proc.start()
215-
processes.append(proc)
216-
for proc in processes:
217-
proc.join()
218-
219201
def item_case_search(files):
220202
import multiprocessing
221203
case_file = files[0]
@@ -230,15 +212,6 @@ def item_case_search(files):
230212
processes.append(p)
231213
for p in processes:
232214
p.join()
233-
#cases(case_file).start()
234-
#csgo_stash_ids(stash_ids).start()
235-
#csgo_stash_ids(stash_ids).join()
236-
#cases(case_file).join()
237-
#run_parallel([cases(case_file), csgo_stash_ids(stash_ids)])
238215
skin_prices(stash_ids, case_file, price_file)
239-
#cases(case_file)
240216
#if not os.path.exists(stash_ids):
241-
#csgo_stash_ids(stash_ids)
242-
#skin_prices(stash_ids,case_file,price_file)
243-
244-
217+
#csgo_stash_ids(stash_ids)

main.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ def avg_revenue_per_case():
1515
skins.append(i.replace('\n',''))
1616
for skin in skins:
1717
cases.append(ast.literal_eval(skin)[0])
18-
#print(skin)
1918
cases = list(dict.fromkeys(cases))
2019
for case in cases:
2120
for i in range(0,len(skins)):
@@ -37,7 +36,6 @@ def avg_revenue_per_case():
3736
addition=addition+pro[1]
3837

3938
new_list.append([case,addition-1.89-float(case_price_dic[case])])
40-
#print(ast.literal_eval(inp_file.readlines().replace('\n','')))
4139
inp_file.close()
4240
out_file.close()
4341
return new_list

0 commit comments

Comments
 (0)