Advertisement
Dlguy

roblox random catalog item generator

Oct 27th, 2023
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 4.20 KB | Software | 0 0
  1. #needs python
  2. # needs visual studio code
  3. #needs to have a chosen folder in visual studio code
  4. #run in visual studio code
  5.  
  6. from token import LESS
  7. import requests
  8. import time
  9. import pandas as pd
  10. import random
  11. import string
  12. print('')
  13. print('made by dsploiter')
  14. print('generates up to 2880 random items!')
  15. print('')
  16. print('')
  17. print("If you get error : KeyError: 'data'")
  18. print('then you try to much to generate.')
  19. print('cool down a bit')
  20. print('')
  21. page = 1
  22. res = []
  23. pagelayers = 1
  24. url = "https://catalog.roblox.com/v1/search/items"
  25. for pagelayers in range(1,27):
  26.     strdrr = '{}%'
  27.     cac = page * 3.5
  28.     print(strdrr.format(cac))
  29.     page = page + 1
  30.     querystring = {"category":"All","cursor":"3_1_12e0c8b6ec6b5d9aaf9df750dd40c127","limit":"120","salesTypeFilter":f"{page}"}
  31.     payload = ''
  32.     headers = {
  33.     "authority": "catalog.roblox.com",
  34.     "accept": "application/json, text/plain, */*",
  35.     "accept-language": "nl,en;q=0.9,en-GB;q=0.8,en-US;q=0.7",
  36.     "cookie": "GuestData=UserID=-1126746035; __utmz=200924205.1690597033.80.16.utmcsr=roblox.com|utmccn=(referral)|utmcmd=referral|utmcct=/; __utma=200924205.1723534138.1686249197.1690890428.1692101755.83; _gcl_au=1.1.656784644.1695905900; .RBXIDCHECK=7715e155-b317-474a-8961-f6aef7aaadcf; _ga_9HRYHVCY79=GS1.2.1696170976.8.0.1696170976.0.0.0; RBXSource=rbx_acquisition_time=10/7/2023 2:53:57 PM&rbx_acquisition_referrer=&rbx_medium=Direct&rbx_source=&rbx_campaign=&rbx_adgroup=&rbx_keyword=&rbx_matchtype=&rbx_send_info=1; _ga=GA1.1.1634218191.1686343370; _ga_BK4ZY0C59K=GS1.1.1697805249.59.1.1697805904.0.0.0; rbx-ip2=; .ROBLOSECURITY=_|WARNING:-DO-NOT-SHARE-THIS.--Sharing-this-will-allow-someone-to-log-in-as-you-and-to-steal-your-ROBUX-and-items.|_D2AADD475361C7FE03D21B08217BD9C338D4334E1FC5A5C17C4834D149C7E81AA912752181B60D4F38858586E19BAA5F965EAE58567F8C181F09BBA7426F4CD7B756DBD3FC18F02EA2EB9D017EEC52F7C4DFD98A08BA3FD7110CEE7E0B73011034AF0D664E1F0D2F0059573ACDD649D02CAAE4071D71C07460E6FCBE97BA4DB0E64C6BD108ECF8D050FF4CF38A41BCF1AA19E1314A4F635BF2B24EEC3BABFBBE53F46607D736B67F0684C304442769925AA6D3BC8FDC4FFDBF466C6D2447C715B3D3CDCF1CB3BE07B83EF104DCE9954BF72FA2049142D3F0D6BC25ECE68DFACB13CAA7C956DCBC4CD526B5A1ED056C719CCADD068BB1AF3AA5AF26C440C000CAC4DA0A37D609CBC50B2616DADD3795ADE03D084BE4A99201DD92A7A785464CF08C1DE373040696B3AC110E69C0A7B579B9301FE912637474D4200CB5CEE25C0F699E6860A249EE97BAAF3AD2F86CE16AA1222C8C6A41CF799D77FDB9BF310F2B7E7831FE843B945F02F80657FA4CF58BD753016B992958360F09B175ECA6C03957DD7784DE7ACB9336C442CA3A9E5E473F674F86802A86A57B50729D85514677A0D3890545A8F5CC5D5A9196BD07EF0CE5F81C278A91A6933A799278C40A8C954D688A2097551B5746DDC013D097AC5A66AE0D65508B2C67E9A4DBB1FBEDCBBAC9AA96EF8B1F392F04C545BE5DE83C105866A1A98F63BB4B83253B030840F20D87720071B6C2FEC930713DCF03689ABF87166369AE0BB53730B53023F750C27AC50CDC7CD11020761245605455DA557290702C53C6E303202350335AAAE58B23B45F65DC015785C6A9956C2CBA1924CDC26BD0E604F4F8E7F997E59D9717F31EA30B686A9E74E1935BAE4542F2FAE0E9257BECAB290AFAA657F5343311385D07CBBF79B1E582372E974FCE89380128125E08B83D4DDA5B350FF1852DE4B9BAA638BC48F003D5AD5CF758FC2776AF7D8C6557F4844D633D2BA67FEF9EE4D59603E2F4B0D2B44014F642110611568B6E4531C2804E; RBXEventTrackerV2=CreateDate=10/27/2023 11:47:13 AM&rbxid=4842831049&browserid=175052602644; RBXSessionTracker=sessionid=8add871b-2c15-4072-976b-317906487a40",
  37.     "origin": "https://web.roblox.com",
  38.     "referer": "https://web.roblox.com/",
  39.     "sec-ch-ua": "^\^Not/A",
  40.     "sec-ch-ua-mobile": "?0",
  41.     "sec-ch-ua-platform": "^\^Windows^^",
  42.     "sec-fetch-dest": "empty",
  43.     "sec-fetch-mode": "cors",
  44.     "sec-fetch-site": "same-site",
  45.     "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36 Edg/115.0.1901.188"
  46. }
  47.     r = requests.request("GET", url, data=payload, headers=headers, params=querystring)
  48.     time.sleep(0.1)
  49.     data = r.json()
  50.     for k in data['data']:
  51.         res.append(k)
  52. print('100%')
  53. print('done')
  54. print('')
  55. print('colleciting done')
  56. print('')
  57. df = pd.json_normalize(res)
  58. print('waiting to import')
  59. print('')
  60. df.to_csv('RandomCatalogItems' + random.choice(string.digits) + random.choice(string.digits) + random.choice(string.digits) + '.csv')
  61. print('importing done')
  62. print('')
Tags: python random
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement