Sinisterly
Python urllib HELP - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Coding (https://sinister.li/Forum-Coding)
+--- Forum: Python (https://sinister.li/Forum-Python)
+--- Thread: Python urllib HELP (/Thread-Python-urllib-HELP)



Python urllib HELP - D0R3K - 04-13-2019

HELLO
How to add click web button (urllib, python)
Thanks!


RE: Python urllib HELP - Request - 04-14-2019

Could you please be a bit more specific?


RE: Python urllib HELP - D0R3K - 04-14-2019

(04-14-2019, 12:03 AM)eClaire Wrote: Could you please be a bit more specific?

error: SyntaxError: invalid syntax
My code:

import urllib

f = raw_input("Add your mail: ")
b = raw_input("Add password: ")
x = raw_input("Target mail: ")
c = raw_input("Subject: ")
url = 'gmailurl'
data=urllib.urlencode{'Email or Phone':f 'submit': 'Next''Enter your password':b 'submit':'Next'}
op = urllib.urlopen('gmailurl',data)


RE: Python urllib HELP - slothic - 04-17-2019

(04-14-2019, 11:57 AM)D0R3K Wrote:
(04-14-2019, 12:03 AM)eClaire Wrote: Could you please be a bit more specific?

error: SyntaxError: invalid syntax
My code:

import urllib

f = raw_input("Add your mail: ")
b = raw_input("Add password: ")
x = raw_input("Target mail: ")
c = raw_input("Subject: ")
url = 'gmailurl'
data=urllib.urlencode{'Email or Phone':f 'submit': 'Next''Enter your password':b 'submit':'Next'}
op = urllib.urlopen('gmailurl',data)

What Python version are you using?


RE: Python urllib HELP - Sartux - 05-14-2019

(04-14-2019, 11:57 AM)D0R3K Wrote:
(04-14-2019, 12:03 AM)eClaire Wrote: Could you please be a bit more specific?

error: SyntaxError: invalid syntax
My code:

import urllib

f = raw_input("Add your mail: ")
b = raw_input("Add password: ")
x = raw_input("Target mail: ")
c = raw_input("Subject: ")
url = 'gmailurl'
data=urllib.urlencode{'Email or Phone':f 'submit': 'Next''Enter your password':b 'submit':'Next'}
op = urllib.urlopen('gmailurl',data)

Looks like you are using python 3 but using raw_input, and also not defining the encode string properly. Try this:
Code:
import urllib f = input("Add your mail: ") b = input("Add password: ") x = input("Target mail: ") c = input("Subject: ") url = 'gmailurl' to_encode = { 'Email or Phone':f, 'submit': 'Next', 'Enter your password':b, 'submit':'Next'} data=urllib.urlencode(to_encode) op = urllib.urlopen('gmailurl',data)



RE: Python urllib HELP - D0R3K - 05-14-2019

(05-14-2019, 11:13 AM)Sartux Wrote:
(04-14-2019, 11:57 AM)D0R3K Wrote:
(04-14-2019, 12:03 AM)eClaire Wrote: Could you please be a bit more specific?

error: SyntaxError: invalid syntax
My code:

import urllib

f = raw_input("Add your mail: ")
b = raw_input("Add password: ")
x = raw_input("Target mail: ")
c = raw_input("Subject: ")
url = 'gmailurl'
data=urllib.urlencode{'Email or Phone':f 'submit': 'Next''Enter your password':b 'submit':'Next'}
op = urllib.urlopen('gmailurl',data)

Looks like you are using python 3 but using raw_input, and also not defining the encode string properly. Try this:
Code:
import urllib f = input("Add your mail: ") b = input("Add password: ") x = input("Target mail: ") c = input("Subject: ") url = 'gmailurl' to_encode = { 'Email or Phone':f, 'submit': 'Next', 'Enter your password':b, 'submit':'Next'} data=urllib.urlencode(to_encode) op = urllib.urlopen('gmailurl',data)

Thanks!!!!!!!!!!!!!!! Biggrin Biggrin Biggrin Biggrin


RE: Python urllib HELP - Sartux - 05-15-2019

(05-14-2019, 03:45 PM)D0R3K Wrote:
(05-14-2019, 11:13 AM)Sartux Wrote:
(04-14-2019, 11:57 AM)D0R3K Wrote: error: SyntaxError: invalid syntax
My code:

import urllib

f = raw_input("Add your mail: ")
b = raw_input("Add password: ")
x = raw_input("Target mail: ")
c = raw_input("Subject: ")
url = 'gmailurl'
data=urllib.urlencode{'Email or Phone':f 'submit': 'Next''Enter your password':b 'submit':'Next'}
op = urllib.urlopen('gmailurl',data)

Looks like you are using python 3 but using raw_input, and also not defining the encode string properly. Try this:
Code:
import urllib f = input("Add your mail: ") b = input("Add password: ") x = input("Target mail: ") c = input("Subject: ") url = 'gmailurl' to_encode = { 'Email or Phone':f, 'submit': 'Next', 'Enter your password':b, 'submit':'Next'} data=urllib.urlencode(to_encode) op = urllib.urlopen('gmailurl',data)

Thanks!!!!!!!!!!!!!!! Biggrin  Biggrin  Biggrin  Biggrin

glad it helped - remember to like if it did Smile

Also feel free to pm me if you need more help!