Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8656343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:15:12+00:00 2026-06-12T15:15:12+00:00

Possible Duplicate: How to download a text file or some objects from webpage using

  • 0

Possible Duplicate:
How to download a text file or some objects from webpage using Python?

I am trying to download a file under “Pre-Release Domains” from this website: http://www.namejet.com/pages/downloads.aspx
So as today is 10th of October you want to get the file “Wednesday, October 10, 2012”.
When the click on the file the link doesn’t changes so I have trouble writing python code to download the particular file as I don’t have the specific URL of particular file. How do I write the script? I want everything to happen in the back end without actually opening the browser:

#!/usr/bin/python

from selenium import webdriver
from pyvirtualdisplay import Display
display = Display(visible=0, size=(1024, 768))
display.start()

browser=webdriver.Firefox() # Select browser that you want to automate 
browser.get('http://www.namejet.com/pages/downloads.aspx')
element=browser.find_element_by_xpath(
            '//a[@id="ctl00_ContentPlaceHolder1_hlPreRelease1"]')
element.click()
display.stop()

This code runs without error but doesn’t downloads the file. What am I doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T15:15:14+00:00Added an answer on June 12, 2026 at 3:15 pm
    In [1]: from selenium import webdriver
    In [2]: browser=webdriver.Chrome() # Select browser that you want to automate 
    In [3]: browser.get('http://www.namejet.com/pages/downloads.aspx')
    In [4]: element=browser.find_element_by_xpath(
                '//a[@id="ctl00_ContentPlaceHolder1_hlPreRelease1"]')
    
    In [5]: element.click()
    

    Now you can find prerelease_10-08-2012.txt in your download folder and you can open it in a usual way.

    EDIT: note that the code downoads the latest file, that is prerelease_10-10-2012.txt as for today. Just tried it and it works fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Access to file download dialog in Firefox I'm using selenium and firefox
Possible Duplicate: Download File Using jQuery Download File Using Javascript/jQuery $('#download').click(function() { var url
Possible Duplicate: How to download a file in python I'm playing with Python for
Possible Duplicate: programatically get the file size from a remote file using delphi, before
Possible Duplicate: Forcing to download a file using PHP If I have a json
Possible Duplicate: Download PDF from url and read it I have to download a
Possible Duplicate: Example of how to download JSON from server? I've read quite a
Possible Duplicate: Remove CSS from a Div using JQuery we can set backgroung-image property
Possible Duplicate: Force Download an Image Using Javascript Basically I want to have the
Possible Duplicate: UIAlertView not showing message text I am trying to create a simple

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.