Hi
How to add python urllib click web button?
Thanks any help!
How to add python urllib click web button?
Thanks any help!
|
Python
Python urllib HELP |
|
Apr 14, 2019 12:40 AM
(This post was last modified: Apr 14, 2019 03:24 AM by N0TR3DAMUS.)
(Apr 13, 2019 11:47 AM)loomski Wrote: Look up Thanks! 🤝 (Apr 13, 2019 11:47 AM)loomski Wrote: Look up 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)
I would recommend Requests against urllib. Also from your code, it would need way more data.
Check this out: https://hackforums.net/showthread.php?tid=5952317 ![]() (Apr 14, 2019 12:40 AM)N0TR3DAMUS Wrote: Thanks! 🤝 I have no idea what you're trying to achieve though. (Apr 13, 2019 10:13 AM)N0TR3DAMUS Wrote: Hi If your sending emails, use.smtplib: https://stackabuse.com/how-to-send-email...ng-python/ Dont even think of using it to spamming though, it'll be pointless (Apr 13, 2019 10:13 AM)N0TR3DAMUS Wrote: Hi Clicking a button would be difficult with url lib or requests,. Ofcourse you can see what HTTP request is send after you click the button yourself and craft that request in your script. Or you could use selenium to interact with the webpage.
In a lot of cases websites have javascript to load the buttons. So If you just looked at the html you grabbed with urlib, you might not even find the button in there at all. You need something like selenium to load the javascript then grab the html. If it's just clicking on something, dm the website and what button it is and I can write you up something in 5-10 lines.
|
|
|
| Possibly Related Threads... | |||
| Thread / Author | Replies | Views | Last Post |
| [Python] by Bass_ReevesAug 20, 2023 01:44 AM | 9 | 630 |
Aug 20, 2023 01:44 AM Last Post: Lucky4L |
| [Python] by PeenutttJul 30, 2017 05:36 PM | 8 | 207 |
Jul 30, 2017 05:36 PM Last Post: Peenuttt |
| [Python] by 41phafr34kJul 9, 2017 12:25 PM | 8 | 146 |
Jul 9, 2017 12:25 PM Last Post: nizarnizario |