Python Forum
new to python, need some help
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
new to python, need some help
#1
so far, i love it. I actually haven't programmed since 2001. I made some poor choices when I was a young man and I've spent most of my life in prison paying for it. But I've always loved programming and honestly I need something to occupy my free time as idle hands make mischief. So my question is basically, how would i go about writing a python program that would auto send the post form at this site repeatedly using a text file that has the email addresses that should be used? Or could someone point me in the right direction where I could learn to do this? When i started in vb3 i would take already made programs and disect them and thats how i learned how the language worked. Is there something that someone has made that already does this? Thanks for the help in advance. Here is the form:

https://www.wired2fish.com/giveaways/sav...8c9cf2d16a


(yes, i love to fish as well lol)
Reply
#2
(Jan-04-2021, 11:17 PM)DarkDriver Wrote: so far, i love it. I actually haven't programmed since 2001. I made some poor choices when I was a young man and I've spent most of my life in prison paying for it. But I've always loved programming and honestly I need something to occupy my free time as idle hands make mischief. So my question is basically, how would i go about writing a python program that would auto send the post form at this site repeatedly using a text file that has the email addresses that should be used? Or could someone point me in the right direction where I could learn to do this? When i started in vb3 i would take already made programs and disect them and thats how i learned how the language worked. Is there something that someone has made that already does this? Thanks for the help in advance. Here is the form:

https://www.wired2fish.com/giveaways/sav...8c9cf2d16a

(yes, i love to fish as well lol)


So basically you wanted to enter the same giveaway multiple times? Out of prison but still breaking TOS, at least its not laws i guess..

It totally depends on the website, it will accept only one email address (uniquely) and likely block your IP if you keep sending POST requests, i can show you how to set that up, let me know if your still interested. I would look at the requests module, and how to POST data using the various parameters. Goodluck
Reply
#3
Like Aspire2Inspire says, you should take a look at the Requests module. The Requests module is used for sending HTTP requests to other computers, or servers.

You can use the post request, which sends information to another computer. This is typically used on API endpoints. It can accept a dictionary or file object (which you can fill with email addresses, I suppose, and send them in unique POST requests) as data to send to the website. The information you should be putting into this dictionary is usually described on the Endpoint's website. Here's an example on how to use the post function:

import requests

data_to_send = {
    "field1": 1,
    "field2": 2,
    "field3": 3,
}

requests.post("https://www.example.com", data=data_to_send)
The function also accepts a JSON keyword argument in the function, so you can encode JSON using json module, and send that.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020