Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I make LWP::UserAgent look like another browser?
    primarykey
    data
    text
    <p>This is my first post on SO, so be gentle. I'm not even sure if this belongs here, but here goes.</p> <p>I want to access some information on one of my personal accounts. The website is poorly written and requires me to manually input the date I want the information for. It is truly a pain. I have been looking for an excuse to learn more Perl so I thought this would be a great opportunity. My plan was to write a Perl script that would login to my account and query the information for me. However, I got stuck pretty quickly. </p> <pre><code>my $ua = LWP::UserAgent-&gt;new; my $url = url 'https://account.web.site'; my $res = $ua-&gt;request(GET $url); </code></pre> <p>The resulting web page basically says that my web browser is not supported. I tried a number of different values for</p> <pre><code>$ua-&gt;agent(""); </code></pre> <p>but nothing nothings seems to work. Google-ing around suggests this method, but it also says that perl is used for malicious reasons on web sites. Do web sites block this method? Is what I am trying to do even possible? Is there a different language that would be more appropriate? Is what I'm trying to do even legal or even a good idea? Maybe I should just abandon my efforts.</p> <p>Note that to prevent giving away any private information, the code I wrote here is not the exact code I am using. I hope that was pretty obvious, though.</p> <p><strong>EDIT:</strong> In FireFox, I disabled JavaScript and CSS. I logged in just fine without the "Incompatible browser" error. It doesn't seem to be JavaScript issue.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload