headless browser in DSM for python

Currently reading
headless browser in DSM for python

iStone

Active member
NAS
DS412+
don't if this is the correct subgroup to ask, please move there if needed.

-------
anyone tried above topic? would be nice to have a self-contained headless browser like PhantomJS...

The current possible headless browsers like Firefox or Chrome still need a complete installation... (aka no-go)



thanks for sharing your experience/ thoughts.
 

iStone

Active member
NAS
DS412+
Why I cannot edit the post anymore?

BTW: it seems even if use node.js (DSM included) also need Chrome or Firefox installed, to be able to use headless browser..

Any comments are appreciated!

It seems the only way is go Docker?
 
Last edited:

Rusty

Staff member
Moderator
NAS Support
Website
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac

iStone

Active member
NAS
DS412+
Just installed it inside docker, but haven't tested it. Will post back.
you installed Chrome or Firefox apt-get into Dcoker ubuntu Xvfb?

man, why is it so complicate to get a headless browser there? any alternative like PhantomJS or for node.js?
 

Rusty

Staff member
Moderator
NAS Support
Website
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac
No I haven’t. No time today to play around with it. Will try tomorrow.
 

iStone

Active member
NAS
DS412+
thanks for taking time...

really fascinating when learning docker => Keras model => Tensorflow => eager execution ... hope I could understand these and try these soon... or one day.. ;-)
 
Last edited:

iStone

Active member
NAS
DS412+
I installed Firefox in Docker ubuntu... file exchange with host(synoNAS) also works...
but get disappointed about Synology & DSM, why do we need to install another Linux(ubuntu) in a encapsulated "Docker" and then can we "apt install firefox", such a redundant use of SynoNAS( running GNU-linux)...

now within this encapsulated Linux, I have to setup development env. again (user, profile, python etc.)

Would that be possible just simply install firefox/chrome into SynoNAS as it is already a Linux?
 

Rusty

Staff member
Moderator
NAS Support
Website
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac
Would that be possible just simply install firefox/chrome into SynoNAS as it is already a Linux?
Officially no, not without breaking something.
 

fredbert

Well-known member
Would that be possible just simply install firefox/chrome into SynoNAS as it is already a Linux?
Just my personal view: DSM NAS is an appliance that happens to be based on tailored version of Linux. The appliance supports different functions through mandatory packages and user-installable packages. This is the official mechanism for adding features. There is access to the underlying DSM Linux for administrators, not standard users, which implies it's provided for maintaining the platform and not day-to-day functionality.

As such (and why I don't use the DSM Linux as a general purpose device) when updating DSM there is no guarantee that any modifications will not be removed or disabled, not for any malicious reason but generally through the assumption of the upgrade process not expecting user modifications and so overwriting a whole set of folders.

The docker approach means you can update DSM and pretty well know that your contains should still work afterwards.

Of course there's nothing to stop you trying to mod the Linux, but it's not for me!
 

iStone

Active member
NAS
DS412+
just found out PhantomJS still works! with this:

Python:
driver.set_window_size(1024, 768)   # ! important
BTW: For 3 headless browser the speed ranks (fast to slow) as Chrome, PhantomJS, FF.
 

WST16

Well-known member
NAS
DS216+II : DS118 : APC Back UPS ES 700 — Mac/iOS user
If you don’t mind me asking, why do you need a “headless browser”?
 

iStone

Active member
NAS
DS412+
web scraping. Do you have a alernative solution or somewhat familiar with these?
 

WST16

Well-known member
NAS
DS216+II : DS118 : APC Back UPS ES 700 — Mac/iOS user
No. I don't know much about it. Just trying to understand and learn.
"Why?" is very powerful. Thanks for answering :)
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.


Top