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 6476321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:48:38+00:00 2026-05-25T06:48:38+00:00

The code snippet i am using :: br.addheaders = [(‘User-agent’, ‘Mozilla/5.0 (X11; U; Linux

  • 0

The code snippet i am using ::

br.addheaders = [('User-agent', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071615 Fedora/3.0.1-1.fc9 Firefox/3.0.1')]

response = br.open('http://www.facebook.com')
br.select_form(nr=0)
br['email'] = USERNAME
br['pass'] = PASSWORD
response2 = br.submit()

assert br.viewing_html()
time.sleep(50) 


for form in br.forms():
    print form

Well i tried writing out response2.read() to file to see what was happening . Only the top navigation bar has loaded . The intention of having time.sleep(50) was to provide time for page load but guess that doesnt work .

What is the right way to do this ?

  • 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-05-25T06:48:39+00:00Added an answer on May 25, 2026 at 6:48 am

    Are you sure you’re passing the correct login?

    I’ve run your code with my login and it works fine for me.

    The only thing I’ll add is that you don’t need the time.sleep(50) in there—Mechanize blocks until it receives all the content.

    Make your question more useful by giving us your complete code sample and the output (including print response2).

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

Sidebar

Related Questions

I have the following code snippet: using (SPSite site = new SPSite(this.ListAddress)) { using
I am using the code snippet below, however it's not working quite as I
I am using this code snippet to add KeyDown event handler to any element
using the Code Snippet for sending email in VB.Net I have successfully sent an
From the book Groovy and Grails recipes I'm using the following code snippet: String
Using the obsolete System.Web.Mail sending email works fine, here's the code snippet: Public Shared
This is the snippet of code i'm using now: def countOccurences(a, b) #counts the
I have the following snippet of code (I'm using jQuery 1.4.2): $.post('/Ads/GetAdStatsRow/', { 'ad_id':
I'm currently testing GAs new async code snippet using two different tracking codes on
is there ready code snippet for using pop-up modal div without using jquery?

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.