Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- respArrar =[]
- filename = "test.txt"
- for i in range (1,100) :
- url = f"https://schoolsbookonline.com/wp-json/wc/v3/orders?status=completed&page={i}&&per_page=100"
- payload={}
- headers = {
- 'Authorization': 'Basic Y2tfNWQ1MjU0MjAxNmJlNTJmMTU2NTc1M2NkMTJlYTE2ZjE2OWExZWI4Nzpjc18xNjFjNDFhYjQ4YzAzNjU2OWU0Mzk5OWQ5OTBiZGU0ODc4NjE1MGNl',
- 'Cookie': 'wfwaf-authcookie-c7d8d8a291508289cb73487818cae234=14%7Cadministrator%7Cmanage_options%2Cunfiltered_html%2Cedit_others_posts%2Cupload_files%2Cpublish_posts%2Cedit_posts%2Cread%2Cmanage_network%7Cc6bf6711699482598084d1d3cec1bfc00c0660c9bb2b8b78abe8055d0398c3fd'
- }
- response = requests.request("GET", url, headers=headers, data=payload)
- respArrar.extend(response)
- with open(filename, "w") as f:
- f.write(str(respArrar))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement