Open Wiedmolol opened 1 year ago
should be like this?
should be like this?
Yes, and edit the request after to includes authentication headers:
foodsi_api = requests.post('https://api.foodsi.pl/api/v2/restaurants', headers = {'Content-type':'application/json', 'system-version':'android_3.0.0', 'user-agent':'okhttp/3.12.0', 'Access-Token': access_token, 'Client': client, 'Uid': uid}, data = json.dumps(req_json))
Its repeated... I see two "try". Should be only one:
yeah, i noticed that too
where do i put foodsi_api = requests.post('https://api.foodsi.pl/api/v2/restaurants', headers = {'Content-type':'application/json', 'system-version':'android_3.0.0', 'user-agent':'okhttp/3.12.0', 'Access-Token': access_token, 'Client': client, 'Uid': uid}, data = json.dumps(req_json))
where do i put foodsi_api = requests.post('https://api.foodsi.pl/api/v2/restaurants', headers = {'Content-type':'application/json', 'system-version':'android_3.0.0', 'user-agent':'okhttp/3.12.0', 'Access-Token': access_token, 'Client': client, 'Uid': uid}, data = json.dumps(req_json))
You need to replace the original one:
foodsi_api = requests.post('https://api.foodsi.pl/api/v2/restaurants', headers = {'Content-type':'application/json', 'system-version':'android_3.0.0', 'user-agent':'okhttp/3.12.0'}, data = json.dumps(req_json))
Or just add the part " 'Access-Token': access_token, 'Client': client, 'Uid': uid}" after the user-agent (and before data).
it doesnt work
it doesnt work
Attach here your python please.
maybe im too stupid to understand
it doesnt support the type of file
maybe im too stupid to understand
No... just zip the file and attach here.
ok
sorry had to edit the zip
everything good? or bad news
Here works:
Do you have in same folder the config.json?
yup, i have in same folder config_example.json and config.json
could you send over the watch_script1.py
yup, i have in same folder config_example.json and config.json
You can delete the example...
This is the python file I used: watch_script1.zip Just copied the code from the one you provided.
thanks ill try now
do i have to open it from python3 command or i can open it from the directory itself, because from the directory the file u sent me it doesnt open, it loads then crashes after like 1 milisecond
You run it from the folder (with all files) using python3...
and the structure of the config.json
it works but after typing the email and confirming it crashes
now i found why it wasnt working earlier, because something is wrong
do you know the solution lol
do you know the solution lol
So what was the issue?
do you know the solution lol
So what was the issue?
probably something wrong with TGTG code 70% sure
because after logging in , then opening the python code it crashes instantly like after i done the verification
do you know the solution lol
So what was the issue?
probably something wrong with TGTG code 70% sure
I'm not able to help here :( Also some remarks: this script use tgtg python library (https://pypi.org/project/tgtg/) - https://github.com/Der-Henning/tgtg not.
i will just use the one that u used
And after create a new account... I have same issue... maybe in free time I can debug - need to extended code:
I login successfully and then when I run... badum tss.
yea, same thing. i added the schedule to the tgtg scanner u told me works good
hey i have last question @antonioli86 with the TGTG scanner it only scans your favorites ? right u can have as many ? or theres a limit
I found the issue in the code... for some reason me or you deleted the refresh part after the foodsi function. watch_script1.zip
Missing code:
This works. Some characters are messed up but you can fix.
About TGTG scanner - it only scans favorites. No limits.
good one, i think ill stay with the TGTG scanner, but people can check this issue forum and use ur watch script, because ntfy.sh is so good, if u click it brings you to the shop instantly
good one, i think ill stay with the TGTG scanner, but people can check this issue forum and use ur watch script, because ntfy.sh is so good, if u click it brings you to the shop instantly
Check my update... I tested and works. ;) Was missing the code to start the watch and refresh. I dont know at which stage this piece of code disappeared lol
good one, i think ill stay with the TGTG scanner, but people can check this issue forum and use ur watch script, because ntfy.sh is so good, if u click it brings you to the shop instantly
Check my update... I tested and works. ;) Was missing the code to start the watch and refresh. I dont know at which stage this piece of code disappeared lol
sure sir will do 1s
works 100%
works 100%
All because that "bloody" piece of code that disappeared somehow. :P Enjoy!
the last test will be tomorrow, all surprise bags got sold. so the only way to test 100% is to wait till tomorrow and check then
theres none TGTG checkers less than 1 minute right? @antonioli86
theres none TGTG checkers less than 1 minute right? @antonioli86
Far as I know - no.
thank you for talking to me, and helping.
the last test will be tomorrow, all surprise bags got sold. so the only way to test 100% is to wait till tomorrow and check then
Tested? About schedule every minute... TGTG scanner uses crontab and crontab does not go down to sub-minute resolution. Here am_bot uses schedule and sleep... you can try change the code - in the refresh function - to run at level of seconds: https://www.alixaprodev.com/how-to-execute-a-function-every-x-seconds-in-python/
@Kirri777 @grutkowski-doz can help here - https://github.com/kacpi2442/am_bot/issues/31 ?
yes please !!!
Wygląda na to, że Foodsi wprowadziło dzisiaj autentykację do requestów po API. W tym momencie API zwraca: