Aug-31-2017, 02:40 PM
Quote:The content is exact the same as in the login page:You have changed my code,EMAIL is wrong it's called
http://technical.traders.com/sub/sublogin2.asp
name
in log in form.# Fill in your details payload = { 'EMAIL': '[email protected]', 'LASTNAME': 'MyLastname' }Change to:
payload = { 'name': '[email protected]', 'LASTNAME': 'MyLastname' }
(Aug-31-2017, 02:06 PM)thomas2004ch Wrote: Besides I want to know if my code for download as below correct?Yes,an open sample pdf test.
import requests file_name = 'pdf_sample.pdf' file_url = 'http://che.org.il/wp-content/uploads/2016/12/pdf-sample.pdf' url_get = requests.get(file_url) with open(file_name, "wb") as pdf: pdf.write(url_get.content)