Downloading a file from a list of weblinks in Python 2.7

web_mining
python

#1
    0
    down vote

    favorite

I have a list of weblinks in a list. I want to go to every link in
the list and download a file from the opened website which is another
link on the opened page and is javascript enabled!

The list of weblinks are like this:
[’“http://www.energychoice.ohio.gov/ApplesToApplesComparision.aspx?Category=Electric&TerritoryId=2&RateCode=1”’, ‘“http://www.energychoice.ohio.gov/ApplesToApplesComparision.aspx?Category=Electric&TerritoryId=9&RateCode=1”’, ‘“http://www.energychoice.ohio.gov/ApplesToApplesComparision.aspx?Category=Electric&TerritoryId=4&RateCode=1”’, ‘“http://www.energychoice.ohio.gov/ApplesToApplesComparision.aspx?Category=Electric&TerritoryId=7&RateCode=1”’, ‘“http://www.energychoice.ohio.gov/ApplesToApplesComparision.aspx?Category=Electric&TerritoryId=6&RateCode=1”’, ‘“http://www.energychoice.ohio.gov/ApplesToApplesComparision.aspx?Category=Electric&TerritoryId=3&RateCode=1”’]

I need to go to every link which will open a website and that would
have the download file “Export offers to XML”. This link is javascript
enabled.

I am a newbie in Python. I am using python 2.7 on ubuntu

Any help would be appreciated!


#2

@Neel

Have you tried using BeautifulSoup or import.io?

You might want to check them out.

Regards,
Kunal