Skip to content

Issue with selector in safe_crawl? #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
aodj-snjallgogn opened this issue Mar 31, 2025 · 0 comments
Open

Issue with selector in safe_crawl? #8

aodj-snjallgogn opened this issue Mar 31, 2025 · 0 comments

Comments

@aodj-snjallgogn
Copy link

Hi again, after your last fix I thought I'd try it out and whilst I can crawl sites now (which is great) the selector= argument doesn't appear to work and errors out.

I thought I would test it out and see if I could scrape the links form Hackernews with this:

result = safe_crawl('https://news.ycombinator.com', selector='td:nth-child(3) > span:nth-child(1) > a:nth-child(1)', output_dir='./output')
Detected platform: darwin_arm64
Found platform-specific binary at /Users/alexander/Developer/projects/services/.venv/lib/python3.11/site-packages/pathik/bin/darwin_arm64/pathik_bin with correct version 0.3.11
Detected platform: darwin_arm64
Found platform-specific binary at /Users/alexander/Developer/projects/services/.venv/lib/python3.11/site-packages/pathik/bin/darwin_arm64/pathik_bin with correct version 0.3.11
Running command: /Users/alexander/Developer/projects/services/.venv/lib/python3.11/site-packages/pathik/bin/darwin_arm64/pathik_bin -outdir ./output -s td:nth-child(3) > span:nth-child(1) > a:nth-child(1) -crawl https://news.ycombinator.com
Running command: /Users/alexander/Developer/projects/services/.venv/lib/python3.11/site-packages/pathik/bin/darwin_arm64/pathik_bin -outdir ./output -s td:nth-child(3) > span:nth-child(1) > a:nth-child(1) -crawl https://news.ycombinator.com
Command stdout: ...
Command stderr: flag provided but not defined: -s
Usage of /Users/alexander/Developer/projects/services/.venv/lib/python3.11/site-packages/pathik/bin/darwin_arm64/pathik_bin:
  -buffer-memory int
 ...

Not sure what the issue is but hopefully it means something to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant