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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T23:03:54+00:00 2026-06-04T23:03:54+00:00

Directly from the python requests examples is this snippet: payload = {‘key1’: ‘value1’, ‘key2’:

  • 0

Directly from the python requests examples is this snippet:

payload = {'key1': 'value1', 'key2': 'value2'}  
r = requests.get("http://httpbin.org/get", params=payload)  
print r.url  
u'http://httpbin.org/get?key2=value2&key1=value1'

But when I try to pull data from a website (using requests 0.13.0):

payload = {'one' : 'one', 'two' : 'two' }  
r = requests.get("http://[ip_removed]/clubs/pairs_results/personal.php", params=payload)
print r.url  
http://[ip_removed]/clubs/pairs_results/

That’s not correctly encoded at all. Ideas?

EDIT:
Looks like the site issues a 302 redirect. How do I deal with that to get the same html that my browser will see.

  • 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-04T23:03:56+00:00Added an answer on June 4, 2026 at 11:03 pm

    The site simply does a HTTP 302-redirect here which requests follows, so you’ll end up on a different url than originally requested. That’s not error but the expected behaviour.

    If you don’t want that, you can add the allow_redirects=False keyword argument when sending the request.

    And by the way: a google search with inurl:... quickly reveals which site you’re talking about here, even if you remove the ip…

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

Sidebar

Related Questions

def getText(nodelist): Extracts the text between XML tags I took this directly from http://docs.python.org/library/xml.dom.minidom.html.
I've tried this example directly from MSDN: Dim Screens() As System.Windows.Forms.Screens and I can't
I'd like to use ZODB directly from C++ and don't want to write Python
I need to have a Java instance fetching data directly from the Python's instance
Why would you compile a Python script? You can run them directly from the
Directly from vim, is there a way to check files into cvs or subversion?
JS library like JQuery can be linked directly from other site (e.g. google). Usually
Should I access global db object directly from within the methods of each class?
How can I invoke a service directly from a view? I'm trying with ${my.domain.service.method}
I would like to interface with linux directly from perl, to execute some calls

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.