HmMmm le jambon...
This commit is contained in:
commit
66b9684e43
4 changed files with 73 additions and 0 deletions
11
.gitignore
vendored
Normal file
11
.gitignore
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Python-generated files
|
||||
__pycache__/
|
||||
*.py[oc]
|
||||
build/
|
||||
dist/
|
||||
wheels/
|
||||
*.egg-info
|
||||
|
||||
# Virtual environments
|
||||
.venv
|
||||
ul.lock
|
1
.python-version
Normal file
1
.python-version
Normal file
|
@ -0,0 +1 @@
|
|||
3.13
|
52
main.py
Normal file
52
main.py
Normal file
|
@ -0,0 +1,52 @@
|
|||
import requests
|
||||
from random import randint
|
||||
from time import sleep
|
||||
|
||||
def make_data(delta : int):
|
||||
data = f"""<path_score>
|
||||
<course>SK-JPN-L1-NA-PE-NA-NA-Y-3</course>
|
||||
<unit_index>0</unit_index>
|
||||
<lesson_index>1</lesson_index>
|
||||
<path_type>general</path_type>
|
||||
<occurrence>1</occurrence>
|
||||
<complete>false</complete>
|
||||
<score_correct>86</score_correct>
|
||||
<score_incorrect>3</score_incorrect>
|
||||
<score_skipped type="fmcp">0</score_skipped>
|
||||
<number_of_challenges>121</number_of_challenges>
|
||||
<delta_time>""" + str(delta) + """</delta_time>
|
||||
<version>186467</version>
|
||||
<updated_at>1749145824044</updated_at>
|
||||
<is_lagged_review_path>false</is_lagged_review_path>
|
||||
</path_score>
|
||||
"""
|
||||
return data
|
||||
|
||||
def main():
|
||||
url = "https://tracking.rosettastone.com/ee/ce/a0fb3563-1d51-41d6-af0b-35fa6b7ebb1b/users/4272153/path_scores?course=SK-JPN-L1-NA-PE-NA-NA-Y-3&unit_index=0&lesson_index=1&path_type=general&occurrence=1&_method=put"
|
||||
headers = {
|
||||
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:139.0) Gecko/20100101 Firefox/139.0',
|
||||
'Accept': '*/*',
|
||||
'content-type': 'text/xml',
|
||||
'x-rosettastone-app-version': 'ZoomCourse/11.11.3',
|
||||
'x-rosettastone-protocol-version': '8',
|
||||
'x-rosettastone-session-token': '90c735245deedd362c732041d61066f02f770e7ffa6a914821b72807cdc6be2c4eb9357a1dbc63f1',
|
||||
'Origin': 'https://totale.rosettastone.com',
|
||||
}
|
||||
|
||||
while True:
|
||||
rand_time = randint(120_000, 180_000)
|
||||
data = make_data(rand_time)
|
||||
|
||||
print(data)
|
||||
resp = requests.post(url, headers=headers, data=data)
|
||||
print(resp)
|
||||
|
||||
if not resp.ok:
|
||||
print("Aborting.")
|
||||
break
|
||||
|
||||
sleep(60)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
9
pyproject.toml
Normal file
9
pyproject.toml
Normal file
|
@ -0,0 +1,9 @@
|
|||
[project]
|
||||
name = "rosette"
|
||||
version = "0.1.0"
|
||||
description = "Add your description here"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.13"
|
||||
dependencies = [
|
||||
'requests'
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue