I'm using the BullionVault API to view my orders. I use the requests from the official documentation https://www.bullionvault.com/help/xml_api.html and python language. My issue is **the request response is the HTML DOM of the BullionVault login page**. Here is my code: login_page_url = "https://or.bullionvault.fr/secure/login.do" login_page_url2 = "https://live.bullionvault.com/secure/j_security_check" payload2 = {'j_username': 'myusername', 'j_password': 'mypassword'} with requests.Session() as s: a = s.get(login_page_url) print(s.cookies) b = s.get(login_page_url2, params = payload2) c = s.get("https://or.bullionvault.fr/secure/view_orders_xml.do") print(a) #output status 200 print(b) #output status 200 print(c) #output status 200 print(c.text) #output HTML DOM What I am doing wrong ?

Member Avatar
Member Avatar
+0 forum 1

Hi, I have created TY.py. The Ty.py file executes and runs successfully. I am trying to make its executable using py2exe and by creating setup.py. It is not able to include the requests. I think it is because 'requests' is not present in 'include' folder for python27. The path of the requests library is at C:\Python27\Lib\site-packages\requests. I do not know where and how I should tell my setup.py about requests. Setup.py from distutils.core import setup import py2exe setup( console=['Ty.py'], options={ 'py2exe': {'includes': ['lxml.html', 'lxml._elementpath', 'lxml.etree','gzip','requests']}, } ) Ty.py import requests, lxml.html,csv si = requests.Session() response = si.post("https://www.lacrossealerts.com/login/", data={'username': 'name123', 'password': …

Member Avatar
Member Avatar
+0 forum 1

I'm trying to prefill webforms in iframes using Requests. If that can't be done, does anyone have a script I can use that works with webbrowser? I like that it calls the default web browser in just about any system, which is great for my Android applications. I've tried using splinter, a wrapper to selenium, but it only opens the browser--firefox only--for a second, fills out the iframe, and then automatically closes. Below is my splinter code. with Browser() as browser: browser.visit(url) r = browser.find_by_id('inpage_to_email').fill('ben@me.com') Any help would be greatly appreciated!

Member Avatar
Member Avatar
+0 forum 2

Does anyone have idea how to fetch a file split into defined number of ranges using the requests module instead of urllib2 ?

Member Avatar
Member Avatar
+0 forum 1

I'm working on Asp MVC 4 framework. in my "abc" page's layout file i added fb login dialog box and fb like button. `<script>(function (d, s, id) {var js, fjs = d.getElementsByTagName(s)[0];if d.getElementById(id))return;js = d.createElement(s);js.id = id;js.src = //connect.facebook.net/en_US/all.js#xfbml=1&appId=appid";fjs.parentNode.insertBefore(js, js); } (document, 'script', 'facebook-jssdk'));</script>` and now i added a partial view in "abc" page which is using the fb app request dialog. `<script src="//connect.facebook.net/en_US/all.js"></script> <script type="text/javascript"> FB.init({ appId: 'xxxxx', cookie: true, status: true, xfbml: true, frictionlessRequests: true }); function all() { FB.getLoginStatus(function (response) { if (response.status === 'connected') { var friend = new Array(); FB.api('/me/friends', function (response) { if (response.error) …

Member Avatar
+0 forum 0

Hi, I have following code. Dim myData1 As MySqlDataReader Dim sqlquary1 = "INSERT INTO table1 (text1) Values (Value1); INSERT INTO table2 (text2) Values (Value2); INSERT INTO table3 (text3) Values (Value3)" Dim command1 As New MySqlCommand command1.Connection = mySqlConnection command1.CommandText = sqlquary1 myData1 = command1.ExecuteReader mySqlConnection.Close() I need to send few request to the mysql in the same time but I need to manage errors as well. I was using ; to seperate queries like: "INSERT INTO table1 (text1) Values (Value1); INSERT INTO table2 (text2) Values (Value2); INSERT INTO table3 (text3) Values (Value3)" but when error apear in first "INSERT" then …

Member Avatar
Member Avatar
+0 forum 2

Hi, Iam trying to post a form with cookies using [Requests module](http://docs.python-requests.org/en/latest/). When I post the form and see the page with the results, there is an error in the page, saying that I didnt fill one field right. Iam absolute sure I fill that field right. When I post the data with web browser, its all right. I think it must be cookie problem, becose when I disable the cookies in the browser and post the right data, it shows the exact same error when I send it via Python. There is the code: # -*- coding: utf-8 -*- …

Member Avatar
Member Avatar
+0 forum 1

Hi all, I was wondering if it is a common thing to do when requesting variables to have the request names in an array and use a for loop to request the submitted variables. (will it hold the values if its a for loop?) What i have at present is this: [CODE] $mobile_phone = $_REQUEST['mobile_phone'] ; $mobile_phone = mysql_real_escape_string($mobile_phone); $work_phone = $_REQUEST['work_phone'] ; $work_phone = mysql_real_escape_string($work_phone); $home_phone = $_REQUEST['home_phone'] ; $home_phone = mysql_real_escape_string($home_phone); $email_address = $_REQUEST['email_address'] ; $email_address = mysql_real_escape_string($email_address); $time = $_REQUEST['time'] ; $time = mysql_real_escape_string($time);[/CODE] and about ten other requests being made too by the way. if i …

Member Avatar
Member Avatar
+0 forum 4

The End.