Iterate over all positions to get the user data
This commit is contained in:
parent
9c3078ce08
commit
2bd9f18629
|
@ -1 +1,4 @@
|
|||
__pycache__/
|
||||
warcprox.sqlite*
|
||||
theman*warcprox-ca
|
||||
warcs/
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
import requests, time
|
||||
from rethinkdb import r
|
||||
|
||||
conn = r.connect()
|
||||
|
||||
for x in range(0, 1000):
|
||||
for y in range(0, 1000):
|
||||
data = {"operationName":"pixelHistory","variables":{"input":{"actionName":"r/replace:get_tile_history","PixelMessageData":{"coordinate":{"x":x,"y":y},"colorIndex":0,"canvasIndex":3}}},"query":"mutation pixelHistory($input: ActInput!) {\n act(input: $input) {\n data {\n ... on BasicMessage {\n id\n data {\n ... on GetTileHistoryResponseMessageData {\n lastModifiedTimestamp\n userInfo {\n userID\n username\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n}\n"}
|
||||
a = requests.post("https://gql-realtime-2.reddit.com/query", json=data, headers={"Authorization": "Bearer 453755016066-RO-3gVqxmH_ShgY7XYDtn2PCt5pTvQ"})
|
||||
r.db("place").table("individual").insert({"time": time.time(), "content": a.json(), "sent": data, "x": x, "y": y}).run(conn)
|
||||
print("Added", x, y)
|
|
@ -0,0 +1,9 @@
|
|||
import requests, time
|
||||
from rethinkdb import r
|
||||
|
||||
for x in range(0, 1000):
|
||||
for y in range(0, 1000):
|
||||
data = {"operationName":"pixelHistory","variables":{"input":{"actionName":"r/replace:get_tile_history","PixelMessageData":{"coordinate":{"x":x,"y":y},"colorIndex":0,"canvasIndex":3}}},"query":"mutation pixelHistory($input: ActInput!) {\n act(input: $input) {\n data {\n ... on BasicMessage {\n id\n data {\n ... on GetTileHistoryResponseMessageData {\n lastModifiedTimestamp\n userInfo {\n userID\n username\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n}\n"}
|
||||
a = requests.post("https://gql-realtime-2.reddit.com/query", json=data, headers={"Authorization": "Bearer 453755016066-TyqOc6Xn80g2ONC_fb1m9wAB-oalJA"})
|
||||
print("Added", x, y)
|
||||
time.sleep(0.09)
|
Loading…
Reference in New Issue