Panigrahi has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's minimum standard of quality and will not be displayed.
  • Comment on Want to extract data in CSV format from a HTTPS site.

Replies are listed 'Best First'.
Re: Want to extract data in CSV format from a HTTPS site.
by LanX (Saint) on Dec 30, 2013 at 13:44 UTC
    Did you try searching, I'm pretty sure this will produce many "sample scripts".

    Next step is modifying them for your needs.

    Then, if necessary, you'll show your efforts and we'll help you improving your Perl skills! =)

    Cheers Rolf

    ( addicted to the Perl Programming Language)

Re: Want to extract data in CSV format from a HTTPS site.
by davido (Cardinal) on Dec 30, 2013 at 17:02 UTC

    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

Re: Want to extract data in CSV format from a HTTPS site.
by marto (Cardinal) on Dec 30, 2013 at 13:45 UTC

    Please read the reply you have when you asked earlier.