kanishka-linux / hlspy Goto Github PK
View Code? Open in Web Editor NEWA simple headless browser
License: GNU General Public License v3.0
A simple headless browser
License: GNU General Public License v3.0
Steps I took to install
root@ramya:/home/w3b# git clone https://github.com/kanishka-linux/hlspy
Cloning into 'hlspy'...
remote: Enumerating objects: 4, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 195 (delta 0), reused 1 (delta 0), pack-reused 191
Receiving objects: 100% (195/195), 61.73 KiB | 196.00 KiB/s, done.
Resolving deltas: 100% (91/91), done.
root@ramya:/home/w3b# cd hlspy/
root@ramya:/home/w3b/hlspy# python3 setup.py sdist
running sdist
running egg_info
creating hlspy.egg-info
writing hlspy.egg-info/PKG-INFO
writing dependency_links to hlspy.egg-info/dependency_links.txt
writing entry points to hlspy.egg-info/entry_points.txt
writing requirements to hlspy.egg-info/requires.txt
writing top-level names to hlspy.egg-info/top_level.txt
writing manifest file 'hlspy.egg-info/SOURCES.txt'
reading manifest file 'hlspy.egg-info/SOURCES.txt'
writing manifest file 'hlspy.egg-info/SOURCES.txt'
running check
creating hlspy-1.1.1
creating hlspy-1.1.1/hlspy
creating hlspy-1.1.1/hlspy.egg-info
creating hlspy-1.1.1/test
copying files to hlspy-1.1.1...
copying README.md -> hlspy-1.1.1
copying setup.py -> hlspy-1.1.1
copying hlspy/init.py -> hlspy-1.1.1/hlspy
copying hlspy/hls.py -> hlspy-1.1.1/hlspy
copying hlspy/netmon.py -> hlspy-1.1.1/hlspy
copying hlspy.egg-info/PKG-INFO -> hlspy-1.1.1/hlspy.egg-info
copying hlspy.egg-info/SOURCES.txt -> hlspy-1.1.1/hlspy.egg-info
copying hlspy.egg-info/dependency_links.txt -> hlspy-1.1.1/hlspy.egg-info
copying hlspy.egg-info/entry_points.txt -> hlspy-1.1.1/hlspy.egg-info
copying hlspy.egg-info/requires.txt -> hlspy-1.1.1/hlspy.egg-info
copying hlspy.egg-info/top_level.txt -> hlspy-1.1.1/hlspy.egg-info
copying test/test.py -> hlspy-1.1.1/test
copying test/test_pdf.py -> hlspy-1.1.1/test
Writing hlspy-1.1.1/setup.cfg
creating dist
Creating tar archive
removing 'hlspy-1.1.1' (and everything under it)
root@ramya:/home/w3b/hlspy# cd dist/
root@ramya:/home/w3b/hlspy/dist# ls
hlspy-1.1.1.tar.gz
root@ramya:/home/w3b/hlspy/dist# pip3 install hlspy-1.1.1.tar.gz
Processing ./hlspy-1.1.1.tar.gz
Collecting PyQt5 (from hlspy==1.1.1)
Downloading https://files.pythonhosted.org/packages/85/bd/8a0c863802449f35ad9ca21a1b73190639c206758b4b5e2425617fc99ce9/PyQt5-5.13.0-5.13.0-cp35.cp36.cp37.cp38-abi3-manylinux1_x86_64.whl (62.1MB)
100% |████████████████████████████████| 62.1MB 17kB/s
Requirement already satisfied: sip in /usr/lib/python3/dist-packages (from hlspy==1.1.1) (4.19.18)
Collecting PyQt5_sip<13,>=4.19.14 (from PyQt5->hlspy==1.1.1)
Downloading https://files.pythonhosted.org/packages/ec/7d/c8d2326c405cfed1858af83915fa02ba9e9722ae3e0343df0950fd900039/PyQt5_sip-4.19.18-cp37-cp37m-manylinux1_x86_64.whl (67kB)
100% |████████████████████████████████| 71kB 3.9MB/s
Building wheels for collected packages: hlspy
Running setup.py bdist_wheel for hlspy ... done
Stored in directory: /root/.cache/pip/wheels/af/2d/a8/89689745ecf0dc3157e6216deade7939ee853abf35e1110819
Successfully built hlspy
Installing collected packages: PyQt5-sip, PyQt5, hlspy
Successfully installed PyQt5-5.13.0 PyQt5-sip-4.19.18 hlspy-1.1.1
root@ramya:/home/w3b/hlspy/dist# ls
hlspy-1.1.1.tar.gz
root@ramya:/home/w3b/hlspy/dist# hlspy
Traceback (most recent call last):
File "/usr/local/bin/hlspy", line 6, in
from hlspy.init import main
File "/usr/local/lib/python3.7/dist-packages/hlspy/init.py", line 32, in
from hls import BrowseUrlT
File "/usr/local/lib/python3.7/dist-packages/hlspy/hls.py", line 29, in
from PyQt5 import QtCore, QtNetwork, QtWidgets, QtWebEngineWidgets, QtWebEngineCore, QtGui
ImportError: cannot import name 'QtWebEngineWidgets' from 'PyQt5' (/usr/local/lib/python3.7/dist-packages/PyQt5/init.py)
documentation is well written, but the install instruction "sudo pip3 install pkg_available_in_directory (or pip install pkg_available_in_directory)" could be improved for us literal-minded programmers who try to install a python module called pkg_available_in_directory.
I would suggest something like "sudo pip3 install {pkg_available_in_directory} (or pip install {pkg_available_in_directory}) where {pkg_available_in_directory} is the exact filename in the 'dist' folder.
in linux Debian with KDE with bullseye 11.
sudo pip3 install git+https://github.com/kanishka-linux/hlspy
Collecting git+https://github.com/kanishka-linux/hlspy
Cloning https://github.com/kanishka-linux/hlspy to /tmp/pip-req-build-i3fpk03_
Running command git clone -q https://github.com/kanishka-linux/hlspy /tmp/pip-req-build-i3fpk03_
Requirement already satisfied: PyQt5 in /usr/lib/python3/dist-packages (from hlspy==1.1.1) (5.15.4)
Collecting PyQtWebEngine
Downloading PyQtWebEngine-5.15.6-cp37-abi3-manylinux1_x86_64.whl (230 kB)
|████████████████████████████████| 230 kB 1.4 MB/s
Collecting sip
Downloading sip-6.6.2-cp37-abi3-manylinux2014_x86_64.whl (978 kB)
|████████████████████████████████| 978 kB 3.1 MB/s
Requirement already satisfied: PyQt5-sip<13,>=12.8 in /usr/lib/python3/dist-packages (from PyQt5->hlspy==1.1.1) (12.8.1)
Collecting PyQt5-sip<13,>=12.8
Downloading PyQt5_sip-12.11.0-cp39-cp39-manylinux1_x86_64.whl (357 kB)
|████████████████████████████████| 357 kB 2.0 MB/s
Collecting PyQtWebEngine-Qt5>=5.15.0
Downloading PyQtWebEngine_Qt5-5.15.2-py3-none-manylinux2014_x86_64.whl (67.5 MB)
|████████████████████████████████| 67.5 MB 64 kB/s
Requirement already satisfied: packaging in /usr/lib/python3/dist-packages (from sip->hlspy==1.1.1) (20.9)
Requirement already satisfied: ply in /usr/lib/python3/dist-packages (from sip->hlspy==1.1.1) (3.11)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from sip->hlspy==1.1.1) (52.0.0)
Requirement already satisfied: toml in /usr/lib/python3/dist-packages (from sip->hlspy==1.1.1) (0.10.1)
Building wheels for collected packages: hlspy
Building wheel for hlspy (setup.py) ... done
Created wheel for hlspy: filename=hlspy-1.1.1-py3-none-any.whl size=22772 sha256=035229c80cb56b792e435913cd5bae9fa0bf2778e37a0a9c0fac76617b4aa660
Stored in directory: /tmp/pip-ephem-wheel-cache-xk2155ca/wheels/5d/f4/17/70c55f1bb727dd3bd442c1d64bee22953072ad9db09314ee08
Successfully built hlspy
Installing collected packages: PyQt5-sip, PyQtWebEngine-Qt5, sip, PyQtWebEngine, hlspy
Attempting uninstall: PyQt5-sip
Found existing installation: PyQt5-sip 12.8.1
Not uninstalling pyqt5-sip at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'PyQt5-sip'. No files were found to uninstall.
Successfully installed PyQt5-sip-12.11.0 PyQtWebEngine-5.15.6 PyQtWebEngine-Qt5-5.15.2 hlspy-1.1.1 sip-6.6.2
here what says:
from PyQt5 import QtCore, QtNetwork, QtWidgets, QtWebEngineWidgets, QtWebEngineCore, QtGui
ImportError: /usr/local/lib/python3.9/dist-packages/PyQt5/QtWebEngineWidgets.abi3.so: undefined symbol: _ZdlPvm, version Qt_5
hlspy
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
[2] 156433 IOT instruction (core dumped) hlspy
This looks fantastic and worked out of the box for me. Unfortunately, it's not quite headless. Running it on a server with no GL and no X, it failed. Is there a way to launch QtWebEngine with the equivalent of chromium's --headless --disable-gpu and/or to otherwise dissuade it from doing anything with graphic output?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.