Questions tagged [lwp-useragent]

The LWP::UserAgent is a class implementing a web user agent in the libwww-perl library.

The LWP::UserAgent is a class implementing a web user agent in the libwww-perl library by Michael Schilli. This class provides the option to setup various configuration options when making HTTP requests, allowing control over headers, cookies, credentials, protocols, proxies and many others.

For example, using a combination of these settings allow the request sender to pretend he is a certain user with certain characteristics - for example, a Windows user that uses Mozilla Firefox 19.0, has certain cookies in his browser and has obtained HTTP auth credentials.

225 questions
0
votes
1 answer

Certificates issue with a perl script

I need to use an url to connect with OSTR to create a ticket via webservice, but I have a problem with certificates. The error (picture here): 500 Can't connect to (certificate verify failed) What I've…
Palak
  • 1
  • 3
0
votes
1 answer

How to pass through redirect page by clicking button in html

I create a perl scripts to get some information from the website. The webpage does not redirect itself and i need to click continue myself to redirect it. Can i do it using perl? #!/usr/bin/perl -w use feature ':5.10'; use strict; use warnings; use…
Tim
  • 214
  • 1
  • 12
0
votes
1 answer

Getting "500 Internal Server Error" retrieving page with LWP::UserAgent

I'm trying to retrieve a page using LWP::UserAgent but I keep getting a "500 Internal Server Error" as a response. Retrieving the exact same page in Firefox (using a fresh "Private Window" - so without any cookies set yet) succeeds without a…
Zippy1970
  • 601
  • 6
  • 20
0
votes
1 answer

getting encrypted value while fetching website using LWP

I am getting encrypted data when fetching the contents of a web site. How to overcome that issue? Here is my script. use LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->agent( "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101…
Micro
  • 11
0
votes
1 answer

How to determine reason for slow response time for LWP::UserAgent on a particular page?

I have the following code: #!/usr/bin/perl use strict; use warnings; use LWP::UserAgent; my $ua = LWP::UserAgent->new; my $response = $ua->get('https://olms.dol-esa.gov/query/getYearlyData.do'); print $response->decoded_content; The code takes…
StevieD
  • 6,925
  • 2
  • 25
  • 45
0
votes
1 answer

Set the ip address in LWP::UserAgent

I'm trying to set the ip address in lwp::useragent so I tried the following. But it throws the following error Can't connect to www.some_domain.com:443 LWP::Protocol::https::Socket: bind: Cannot assign requested address at…
mkHun
  • 5,891
  • 8
  • 38
  • 85
0
votes
1 answer

Don't download images while scraping

I am using LWP::UserAgent to scrape some pages. To save bandwidth, I don't want to download images and other media on the page, I am only interested in the text. Can't find anything in the documentation which can help me with this. Please help
GrSrv
  • 551
  • 1
  • 4
  • 22
0
votes
1 answer

PERL LWP::Parallel::UserAgent with proxy and custom user agent

I can't make parallel connections changing the user agent and passing through a proxy. This is my simple script: use HTTP::Request; use LWP::ConnCache; use LWP::Parallel::UserAgent; $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0; my $reqs = [ …
marine
  • 1
0
votes
1 answer

Pass perl file arguments to LWP HTTP request

Here is my issue with handling argument Perl. I need to pass Perl argument argument to a http request (Webservice) whatever Argument given to the perl file. perl wsgrep.pl -name=john -weight -employeeid -cardtype=physical In the wsgrep.pl file, i…
Raja
  • 3,477
  • 12
  • 47
  • 89
0
votes
2 answers

Perl LWP: Submitting a Query - Error 400 URL must be absolute

I need to create a script that accesses a website, submits a query, 'clicks' on one of the hits, and sends back the url of the result. What I'm stuck on is submitting the query in the first place. Here is what I have: use strict; use warnings; use…
Aditya J.
  • 131
  • 2
  • 11
0
votes
1 answer

PERL WCF Web Service Call Fails

I am making web service calls using PERL to one of our vendor provided web services. The web services use SOAP 1.2 and WSHttpBinding. I am able to make calls successfully to most of the calls in the web service, except for the RetrieveReport…
0
votes
1 answer

how to get the file sent in xml response in perl?

Using the LWP user agent I am sending the request and getting the response. I will get the response in html format and a file attached in it. eg: ` Download Files
sharon
  • 734
  • 6
  • 15
0
votes
2 answers

Uploading a file with perl LWP PUT method silency fails

I am trying to upload a file to a public API with a code similar to this: my $ua = LWP::UserAgent->new; sub uploadbox { my $url = "http://host/token"; my $response = $ua->put($url, 'Content_Type' => 'form-data', 'Content'…
Manu
  • 426
  • 3
  • 17
0
votes
1 answer

LWP::UserAgent unable to establish 'keep-alive' connection

I am using the LWP::UserAgent to connect to fetch some connection use LWP::UserAgent; use LWP::ConnCache; use LWP::Debug qw(+); my $ua = LWP::UserAgent->new( conn_cache => 1); my $cache = $ua->conn_cache(LWP::ConnCache->new( )); …
made_in_india
  • 2,109
  • 5
  • 40
  • 63
0
votes
1 answer

How to run parallel fork as single thread in perl?

I was trying to check response messages written in perl which takes requests through Amazon API and returns responses..How to run parallel fork as single thread in perl?. I'm using LWP::UserAgent module and I want to debug HTTP requests.