Skip to content

Instantly share code, notes, and snippets.

from playwright.sync_api import sync_playwright
from playwright_stealth import Stealth
import time
with sync_playwright() as p:
browser = p.chromium.launch(headless=False)
stealth_config = Stealth()
context = browser.new_context(
user_agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36',
PATH: [GET] /organisations/org_1
REQUEST BODY: null
----v
RESPONSE CODE: 200
RESPONSE BODY: {
"id": "org_1",
"name": "testorg",
"specialities": [
{
PATH: [GET] /workers/w_1/public?start_day=2018-05-07T00:00:00Z&number_of_days=3
REQUEST BODY: null
----v
RESPONSE CODE: 200
RESPONSE BODY: {
"id": "w_1",
"name": "John Snow Beta",
"title": "Dr.",
"description": "",
PATH: [POST] /organisations/org_1/workers/filter/secure
REQUEST BODY: {}
----v
RESPONSE CODE: 200
RESPONSE BODY: [
{
"id": "w_1",
"auth0_id": "JohnSnowAuth0MockID",
"name": "John Snow Beta",
PATH: [POST] /organisations/org_1/appointments
REQUEST BODY: {"query":"","states":null,"order_by":"appointment_time","order_direction":"desc","create_time_after":null,"create_time_before":null,"appointment_time_after":null,"appointment_time_before":null,"limit":null,"page":null}
----v
RESPONSE CODE: 200
RESPONSE BODY: [
{
"id": "ap_6",
"state": "VERIFIED",
"worker": null,
"calculation": [
{
"paid_to": "supplier",
"paid_by": "customer",
"description": "Commissionable fare",
"_type": "AbsoluteAmount",
"tags": [
"customer_fare",
"full_fare",
"commissionable_fare"
curl -X POST -H "Content-Type: application/json" -d '{
"from_location": {
"latitude": 1.3278241,
"longitude": 103.7300089,
"zip_code": "W1J0DX",
"poi_id": null
},
"to_location": {
"latitude": 1.350091,
"longitude": 103.700569,
@ryan-popa
ryan-popa / Moneta SG request
Created August 1, 2016 11:41
Moneta SG request
{
"from_location": {
"latitude": 1.3278241,
"longitude": 103.7300089,
"zip_code": null,
"poi_id": null
},
"to_location": {
"latitude": 1.350091,
"longitude": 103.700569,
<env:Envelope xmlns:env=\'http://schemas.xmlsoap.org/soap/envelope/\'><env:Header></env:Header><env:Body>
<QuotationResponse xmlns="http://www.haulmont.com/sherlock/adler">
<responseCode>OK</responseCode>
<pickupStatistics>
<asap>true</asap>
<delay>5</delay>
</pickupStatistics>
<price>
<net>12.60</net>
<taxTotal>0</taxTotal>
@ryan-popa
ryan-popa / gist:11380633
Created April 28, 2014 18:48
python mergesort topdown
def mergesort(a):
mergesort2(a,0,len(a)-1)
return a
def mergesort2(a,begin,end):
if end-begin<1:
return