chore(scout): remove temp probe scripts committed by mistake
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
import io
|
||||
from playwright.sync_api import sync_playwright
|
||||
out = io.open('_ap_out.txt', 'w', encoding='utf-8')
|
||||
with sync_playwright() as p:
|
||||
b = p.chromium.launch()
|
||||
pg = b.new_page()
|
||||
calls = []
|
||||
pg.on('response', lambda r: calls.append((r.request.method, r.url, r.status,
|
||||
r.headers.get('content-type', ''), r.request.post_data)))
|
||||
pg.goto('https://jobs.apple.com/en-us/search?location=switzerland-CHE',
|
||||
wait_until='domcontentloaded', timeout=60000)
|
||||
pg.wait_for_timeout(10000)
|
||||
for m, u, st, ct, pd in calls:
|
||||
if 'jobs.apple.com' in u and ('api' in u or 'search' in u or 'graphql' in u):
|
||||
out.write('%s %s [%s] %s\n' % (m, u[:170], st, ct[:40]))
|
||||
if pd: out.write(' POST %s\n' % pd[:400])
|
||||
out.write('---- page text ----\n')
|
||||
out.write(pg.inner_text('body')[:1200])
|
||||
b.close()
|
||||
out.close()
|
||||
@@ -1,31 +0,0 @@
|
||||
import io, json
|
||||
from playwright.sync_api import sync_playwright
|
||||
SITES = {
|
||||
'roche': 'https://careers.roche.com/global/en/search-results?keywords=&locationsearch=Switzerland',
|
||||
'meta': 'https://www.metacareers.com/jobs?offices[0]=Zurich%2C%20Switzerland',
|
||||
'apple': 'https://jobs.apple.com/en-us/search?location=switzerland-CHE',
|
||||
}
|
||||
out = io.open('_fix_out.txt', 'w', encoding='utf-8')
|
||||
with sync_playwright() as p:
|
||||
b = p.chromium.launch()
|
||||
for k, u in SITES.items():
|
||||
pg = b.new_page(); calls = []
|
||||
def on_resp(r, calls=calls):
|
||||
ct = r.headers.get('content-type', '')
|
||||
if 'json' in ct and r.request.method in ('GET', 'POST'):
|
||||
calls.append((r.request.method, r.url, r.request.post_data))
|
||||
pg.on('response', on_resp)
|
||||
try:
|
||||
pg.goto(u, wait_until='domcontentloaded', timeout=60000)
|
||||
pg.wait_for_timeout(9000)
|
||||
pg.mouse.wheel(0, 5000); pg.wait_for_timeout(4000)
|
||||
out.write('== %s\n' % k)
|
||||
for m, url, pd in calls:
|
||||
if any(w in url.lower() for w in ('search', 'job', 'graphql', 'widget', 'role')):
|
||||
out.write(' %s %s\n' % (m, url[:190]))
|
||||
if pd: out.write(' POST %s\n' % pd[:600])
|
||||
except Exception as e:
|
||||
out.write('== %s ERR %s\n' % (k, str(e)[:150]))
|
||||
pg.close()
|
||||
b.close()
|
||||
out.close()
|
||||
@@ -1,21 +0,0 @@
|
||||
import io
|
||||
from playwright.sync_api import sync_playwright
|
||||
out = io.open('_mt_out.txt', 'w', encoding='utf-8')
|
||||
with sync_playwright() as p:
|
||||
b = p.chromium.launch()
|
||||
pg = b.new_page()
|
||||
pg.goto('https://www.metacareers.com/jobs?offices[0]=Zurich%2C%20Switzerland',
|
||||
wait_until='domcontentloaded', timeout=60000)
|
||||
pg.wait_for_timeout(9000)
|
||||
for _ in range(6):
|
||||
pg.mouse.wheel(0, 5000); pg.wait_for_timeout(1200)
|
||||
n = pg.locator("a[href*='/jobs/']").count()
|
||||
n2 = pg.locator("a[href*='/profile/job_details/']").count()
|
||||
out.write('a[/jobs/]=%d a[/profile/job_details/]=%d\n' % (n, n2))
|
||||
for i in range(min(n, 30)):
|
||||
el = pg.locator("a[href*='/jobs/']").nth(i)
|
||||
out.write(' %s | %s\n' % ((el.inner_text() or '').replace('\n', ' / ')[:90],
|
||||
(el.get_attribute('href') or '')[:60]))
|
||||
out.write('---TEXT---\n' + pg.inner_text('body')[:900])
|
||||
b.close()
|
||||
out.close()
|
||||
Reference in New Issue
Block a user