How can I execute javascript in bash?

I am trying to go to the Bash page at http://www.ocwconsortium.org/ . The page appears when you write math in the box in the upper right corner. I tested

open http://www.ocwconsortium.org/#mathematics

but this leads to the main page. This is definitely part of javascript. How to get results directly from Bash on the first page?

[Explanation]

Take an example. I have the following lines for the Math search engine in .bashrc:

alias mathundergradsearch='/Users/user/bin/mathundergraduate'

Things in a separate file:

#!/bin/sh                                                                                                                                                                     

q=$1
w=$2
e=$3
r=$4
t=$5

open "http://www.google.com/cse?cx=007883453237583604479%3A1qd7hky6khe&ie=UTF-8&q=$q+$w+$e+$r+$t&hl=en"

Now I want something similar to an example. The difference is that on another site there is javascript or something that does not allow me to see the parameters. How can I find out where to specify the search parameters, since I do not see the details?

+3
5
open "http://www.ocwconsortium.org/index.php?q=mathematics&option=com_coursefinder&uss=1&l=&s=&Itemid=166&b.x=0&b.y=0&b=search"

, URL- , .

+3

- (, lynx) javascript.

, , . , . , , javascript ( ), , .

javascript ( ), , bash cygwin. cscript.exe .js , .

+3

JavaScript -

http://www.ocwconsortium.org/index.php?q=mathematics&option=com_coursefinder&uss=1&l=&s=&Itemid=166&b.x=0&b.y=0&b=search

mathematics ( q=) . , , , .

URL-.

+1

, URL-, JavaScript, open URL-.

0

: http://www.phantomjs.org/.

PhantomJS CLI, Chrome.

0

Source: https://habr.com/ru/post/1707163/


All Articles