03-25-2019
Quote:
Originally Posted by
locoroco
I'm creating login, download and upload scripts for different websites, and have become curious during the process.
I'm not in conflict with anyone's permission.
If you want to process Javascript outside of the browser you can use
node.js and other
V8 engines.
Node.js is a JavaScript runtime built on
Chrome's V8 JavaScript engine.
Quote:
V8 is Google's open source high-performance JavaScript and WebAssembly engine, written in C++. It is used in Chrome and in Node.js, among others. It implements ECMAScript and WebAssembly, and runs on Windows 7 or later, macOS 10.12+, and Linux systems that use x64, IA-32, ARM, or MIPS processors. V8 can run standalone, or can be embedded into any C++ application.
Quote:
.... the Ecma Standard defines the ECMAScript 2020 Language. It is the tenth edition of the ECMAScript Language Specification. Since publication of the first edition in 1997, ECMAScript has grown to be one of the world's most widely used general-purpose programming languages. It is best known as the language embedded in web browsers but has also been widely adopted for server and embedded applications.
See also, as a reference on how to "screen scrape" with Javascript and render Javascript
:
The Ultimate Guide to Web Scraping with Node.js
You can research, modify and adapt these ideas as you see fit for your web app.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
We are trying to invoke a https service from our unix script using curl command. The service is not getting invoked because it is SSL configured. Bypassing certification (using curl –k) does not work.
curl -k https://site
curl -k -x IP:Port https://site
curl -k -x IP:443 https://id:pwd@site
... (0 Replies)
Discussion started by: dineshbabu01
0 Replies
2. Shell Programming and Scripting
I need a proxy that would enable me to use cli curl/wget with another ip address.
How do I find a paid proxy server that supports curl/wget? (1 Reply)
Discussion started by: locoroco
1 Replies
3. Shell Programming and Scripting
I'm using a proxy service with an ip address and a port number.
How do I use the proxy with wget or cli curl? (1 Reply)
Discussion started by: locoroco
1 Replies
4. Shell Programming and Scripting
Hello,
I am wondering does anyone know of a method using curl/wget or other where by I could specify the IP address of the server I wish to query for a website.
Something similar to editing /etc/hosts but that can be done directly from the command line. I have looked through the man pages... (4 Replies)
Discussion started by: colinireland
4 Replies
5. Shell Programming and Scripting
Hi
I need a Shell script that will download a zip file every second from a http server but i can't use neither curl nor wget.
Can anyone will help me go about this task ???
Thanks!! (1 Reply)
Discussion started by: rubber08
1 Replies
6. Shell Programming and Scripting
i use curl and wget quite often.
i set up alarms on their output. for instance, i would run a "wget" on a url and then search for certain strings within the output given by the "wget".
the problem is, i cant get the entire output or response of my wget/curl command to show up correctly in... (3 Replies)
Discussion started by: SkySmart
3 Replies
7. Shell Programming and Scripting
Hi,
My script needs to crawl the data from a third party site. Currently it is written in wget. The third party site is of shared interface with different IP addresses.
My wget works with all the IP address but not with one. Whereas the curl is able to hit that IP address and comes out... (2 Replies)
Discussion started by: sathyaonnuix
2 Replies
8. Shell Programming and Scripting
Experts,
I login to a 3rd party and pull some valuable information with my credentials. I pass my credentials via --post-data in wget.
Now my Account is locked. I want my wget to alert that the Account is locked. How can i achieve this.
My idea is, get the Source page html from the... (2 Replies)
Discussion started by: sathyaonnuix
2 Replies
9. Shell Programming and Scripting
Hello,
What I am trying to do is to get html data of a website automatically.
Firstly I decided to do it manually and via terminal I entered below code:
$ wget http://www.***.*** -q -O code.html
Unfortunately code.html file was empty.
When I enter below code it gave Error 303-304
$... (1 Reply)
Discussion started by: baris35
1 Replies
10. Shell Programming and Scripting
i'm using this command to post data to a remote host:
wget --post-data="My Data" http://<my-ip>:80 -O /dev/null -q
and
curl --data "My Data" http://<my-ip>:80
however, when i run the above, i see the following in my access log on the remote host:
Wget:
10.10.10.10 - - "POST /... (1 Reply)
Discussion started by: SkySmart
1 Replies
LEARN ABOUT DEBIAN
http::recorder
HTTP::Recorder(3pm) User Contributed Perl Documentation HTTP::Recorder(3pm)
NAME
HTTP::Recorder - record interaction with websites
SYNOPSIS
Using HTTP::Recorder as a Web Proxy
Set HTTP::Recorder as the user agent for a proxy, and it rewrites HTTP responses so that additional requests can be recorded.
The Proxy Script
For quick start, run the httprecorder script
httprecorder
This will open a local proxy on port 8080, and will dump the recorded traffic to a file named http_traffic in the current directory. use
the -help parameter for usage info
Start the proxy script, then change the settings in your web browser so that it will use this proxy for web requests. For more information
about proxy settings and the default port, see HTTP::Proxy.
The script will be recorded in the specified file, and can be viewed and modified via the control panel.
For better control, use this example:
#!/usr/bin/perl
use HTTP::Proxy;
use HTTP::Recorder;
my $proxy = HTTP::Proxy->new();
# create a new HTTP::Recorder object
my $agent = new HTTP::Recorder;
# set the log file (optional)
$agent->file("/tmp/myfile");
# set HTTP::Recorder as the agent for the proxy
$proxy->agent( $agent );
# start the proxy
$proxy->start();
Start Recording
Now you can use your browser as your normally would, and your actions will be recorded in the file you specified. Alternatively, you can
start recording from the Control Panel.
Using the Control Panel
If you have Javascript enabled in your browser, go to the HTTP::Recorder control URL (http://http-recorder by default), optionally type a
URL into the "Goto page" field, and click "Go".
In the new window, interact with web sites as you normally do, including typing a new address into the address field. The Control Panel
will be updated after each recorded action.
The Control Panel allows you to modify, delete, or save your script.
SSL sessions
As of version 0.03, HTTP::Recorder can record SSL sessions.
To begin recording an SSL session, go to the control URL (http://http-recorder/ by default), and enter the initial URL. Then, interact
with the web site as usual.
Script output
By default, HTTP::Recorder outputs WWW::Mechanize scripts.
However, you can override HTTP::Recorder::Logger to output other types of scripts.
Functions
new
Creates and returns a new HTTP::Recorder object, referred to as the 'agent'.
$agent->prefix([$value])
Get or set the prefix string that HTTP::Recorder uses for rewriting responses.
$agent->control([$value])
Get or set the URL of the control panel. By default, the control URL is 'http-recorder'.
The control URL will display a control panel which will allow you to view and edit the current script.
$agent->logger([$value])
Get or set the logger object. The default logger is a HTTP::Recorder::Logger, which generates WWW::Mechanize scripts.
$agent->ignore_favicon([0|1])
Get or set ignore_favicon flag that causes HTTP::Recorder to skip logging requests favicon.ico files. The value is 1 by default.
$agent->file([$value])
Get or set the filename for generated scripts. The default is '/tmp/scriptfile'.
Bugs, Missing Features, and other Oddities
Javascript
WWW::Mechanize can't play back Javascript actions, and HTTP::Recorder doesn't record them.
Why are my images corrupted?
HTTP::Recorder only tries to rewrite responses that are of type text/*, which it determines by reading the Content-Type header of the
HTTP::Response object. However, if the received image gives the wrong Content-Type header, it may be corrupted by the recorder. While
this may not be pleasant to look at, it shouldn't have an effect on your recording session.
See Also
See also LWP::UserAgent, WWW::Mechanize, HTTP::Proxy.
Requests & Bugs
Please submit any feature requests, suggestions, bugs, or patches at http://rt.cpan.org/, or email to bug-HTTP-Recorder@rt.cpan.org.
If you're submitting a bug of the type "X doesn't record correctly," be sure to include a (preferably short and simple) HTML page that
demonstrates the problem, and a clear explanation of a) what it does that it shouldn't, and b) what it should do instead.
Author
Copyright 2003-2005 by Linda Julien <leira@cpan.org>
Maintained by Shmuel Fomberg <semuelf@cpan.org>
Released under the GNU Public License.
perl v5.14.2 2012-04-23 HTTP::Recorder(3pm)