Here is the basic framework you will have to follow:

Use Crypt::SSLeay and LWP::UserAgent, or something that is derived from those two as a foundation. Using those modules or some derivative, log into the website. Fetch the desired page, and parse out the data you need using some HTML parser from CPAN (just use the search terms HTML Parser and take your pick based on which one has documentation that appeals to you). Then use Text::CSV or Text::CSV_XS to parse the CSV that you grabbed. Profit!

Go ahead and get started now. Let us know when you get stuck. If it looks like you're going to get stuck with every step along the way, take on a simpler project for the purposes of learning Perl and learning to program first. Then come back to this one if it still holds your interest once you're sufficiently proficient with Perl to mostly get it done.

You will certainly find fewer obstacles if you first learn to grab a web page that is not behind an HTTPS/SSL connection. Also learn how to process CSV. And how to parse an HTML document that you've saved as a file. Once you've taken on these individual learning exercises, layering in HTTPS, and putting the pieces together will no longer be an insurmountable challenge.


Dave


In reply to Re: Want to extract data in CSV format from a HTTPS site. by davido
in thread Want to extract data in CSV format from a HTTPS site. by Panigrahi

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.