scrapinghub / portia

Visual scraping for Scrapy
BSD 3-Clause "New" or "Revised" License
9.28k stars 1.41k forks source link

Fix portia_server #921

Open milahu opened 2 years ago

milahu commented 2 years ago

this PR is abandoned in favor of Gerapy

fix #883 #920 #913 #907 #903 #902 #895 #877 #842 #812 #811 #790 #760 #742 ...

todo

related https://github.com/scrapinghub/portia2code/pull/12 https://github.com/scrapy/scrapely/pull/122

Clarence-G commented 2 years ago

Thank you very much for your contribution. I recently strongly needed a working version. How to compile and run the branch?

milahu commented 2 years ago

im using nix for packaging, as it gives great flexibility. when you're on linux, nix is easy to install ... on windows, you need WSL save the build file portia-server.nix and run

nix-build -E 'with import <nixpkgs> { }; callPackage ./portia-server.nix { }'
./result/bin/portia-server --help

note, this branch is a work in progress

the python code is "basically working"

the javascript code is on my todo list, something with this, probably npmlock2nix as portiaui is using the npm lockfile package-lock.json ideally update dependencies and fix API changes ... yay

Clarence-G commented 2 years ago

@milahu Thanks for your explanation. I have installed nix on WSL. But I couldn't find the build file portia-server.nix. So how to wrtie the build file?

milahu commented 2 years ago

I have installed nix on WSL

cool. is it working? ^^

nix-shell -p cowsay --run 'cowsay "yepp, nix seems to work"'

I couldn't find the build file portia-server.nix

see my first post, but thats an old version

how good is your javascript and python? if you want to help, i can share my current nix build files so you can (hopefully) reproduce my development environment

basically im just printing variables and googling for error messages ...

milahu commented 2 years ago

slowly getting there ...

Screenshot_2022-04-17_23-59-05 portia scrapy gui

google captcha throws Frames are not supported by Portia → #494

Screenshot_2022-04-18_00-00-35 portia bug Frames are not supported by Portia

milahu commented 2 years ago

abandoning this PR in favor of Gerapy