Bitcoin Forum
November 14, 2024, 04:09:40 AM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: Auto Posting on this forum  (Read 1219 times)
acegilz (OP)
Full Member
***
Offline Offline

Activity: 211
Merit: 100

1ACEGiLZnZoG7KUNkMwAT8tBuJ6jsrwj5Q


View Profile
January 23, 2016, 03:38:30 PM
 #1

I am starting a topic for sports events tips and instead of mannually posting the tip, I would like to automatically post on my topic as soon as I receive it- the more time pass the less valuable is the tip, so if I can share it quickly it's better.

I know this forum has no api however I would like to know if there is any way to post stuff automatically (not spam!)
achow101
Staff
Legendary
*
Offline Offline

Activity: 3542
Merit: 6886


Just writing some code


View Profile WWW
January 23, 2016, 03:41:12 PM
 #2

Write a bot that sends the proper HTTP Post requests to the forum in order to post.

Jet Cash
Legendary
*
Offline Offline

Activity: 2828
Merit: 2472


https://JetCash.com


View Profile WWW
January 23, 2016, 03:52:02 PM
 #3

Advertising keeps the boards alive. Bots will diminish the value of the viewing. Also, if the same topic appears on numerous boards, the unique character of the forum will be lost. Will you be visiting the thread after it has been started to see what members think of the topic?

Offgrid campers allow you to enjoy life and preserve your health and wealth.
Save old Cars - my project to save old cars from scrapage schemes, and to reduce the sale of new cars.
My new Bitcoin transfer address is - bc1q9gtz8e40en6glgxwk4eujuau2fk5wxrprs6fys
traderbit
Hero Member
*****
Offline Offline

Activity: 798
Merit: 1000



View Profile WWW
January 23, 2016, 03:52:41 PM
 #4

I am starting a topic for sports events tips and instead of mannually posting the tip, I would like to automatically post on my topic as soon as I receive it- the more time pass the less valuable is the tip, so if I can share it quickly it's better.

I know this forum has no api however I would like to know if there is any way to post stuff automatically (not spam!)
What kind of stuff will be that, will you put them in a notepad file or how do you think. I can make a bot for you but need more details to know if I'm able to finish it.

acegilz (OP)
Full Member
***
Offline Offline

Activity: 211
Merit: 100

1ACEGiLZnZoG7KUNkMwAT8tBuJ6jsrwj5Q


View Profile
January 23, 2016, 04:32:37 PM
 #5

Write a bot that sends the proper HTTP Post requests to the forum in order to post.

This is what I am looking for. I know how to scrape html and shit but don't know how to post comments to forum since it requires many parameters, cookies, etc

How do I need to post on this specific forum? If I tamper the data sent when i send this post I see a lot of random data, timestamps and numbers that I'm not sure how to automatize
achow101
Staff
Legendary
*
Offline Offline

Activity: 3542
Merit: 6886


Just writing some code


View Profile WWW
January 23, 2016, 04:44:50 PM
 #6

Write a bot that sends the proper HTTP Post requests to the forum in order to post.

This is what I am looking for. I know how to scrape html and shit but don't know how to post comments to forum since it requires many parameters, cookies, etc

How do I need to post on this specific forum? If I tamper the data sent when i send this post I see a lot of random data, timestamps and numbers that I'm not sure how to automatize
The basic way is to create an HTTP Post with 4 parameters. Those are subject, message, topic, icon, and sc. Obviously subject is the title of the thread, message is what you want to post, topic is the topic id, icon is the icon, and sc is a secret which you have to scrape from reply page.

If you look at the source for the reply page, you will see a form. The action of that form is the URL you want to send the post to. Then there is a hidden input with the name topic. The value of that is the topic. Lastly there is a hidden input named sc. The value of that is sc. Just put all that in the post request and it should post.

I made a Bitcointalk Android app a while back. You can reference its posting code if you need it. It should be relatively self-explanatory. The link to that specific posting code is here: https://github.com/achow101/BitcointalkForum/blob/master/app/src/main/java/com/achow101/bitcointalkforum/fragments/ReplyFragment.java#L406

acegilz (OP)
Full Member
***
Offline Offline

Activity: 211
Merit: 100

1ACEGiLZnZoG7KUNkMwAT8tBuJ6jsrwj5Q


View Profile
January 23, 2016, 08:22:04 PM
 #7

Write a bot that sends the proper HTTP Post requests to the forum in order to post.

This is what I am looking for. I know how to scrape html and shit but don't know how to post comments to forum since it requires many parameters, cookies, etc

How do I need to post on this specific forum? If I tamper the data sent when i send this post I see a lot of random data, timestamps and numbers that I'm not sure how to automatize
The basic way is to create an HTTP Post with 4 parameters. Those are subject, message, topic, icon, and sc. Obviously subject is the title of the thread, message is what you want to post, topic is the topic id, icon is the icon, and sc is a secret which you have to scrape from reply page.

If you look at the source for the reply page, you will see a form. The action of that form is the URL you want to send the post to. Then there is a hidden input with the name topic. The value of that is the topic. Lastly there is a hidden input named sc. The value of that is sc. Just put all that in the post request and it should post.

I made a Bitcointalk Android app a while back. You can reference its posting code if you need it. It should be relatively self-explanatory. The link to that specific posting code is here: https://github.com/achow101/BitcointalkForum/blob/master/app/src/main/java/com/achow101/bitcointalkforum/fragments/ReplyFragment.java#L406

Many thanks!
I will get deeper on that link later today and contact you if needed.
acegilz (OP)
Full Member
***
Offline Offline

Activity: 211
Merit: 100

1ACEGiLZnZoG7KUNkMwAT8tBuJ6jsrwj5Q


View Profile
January 23, 2016, 11:42:37 PM
 #8

Write a bot that sends the proper HTTP Post requests to the forum in order to post.

This is what I am looking for. I know how to scrape html and shit but don't know how to post comments to forum since it requires many parameters, cookies, etc

How do I need to post on this specific forum? If I tamper the data sent when i send this post I see a lot of random data, timestamps and numbers that I'm not sure how to automatize
The basic way is to create an HTTP Post with 4 parameters. Those are subject, message, topic, icon, and sc. Obviously subject is the title of the thread, message is what you want to post, topic is the topic id, icon is the icon, and sc is a secret which you have to scrape from reply page.

If you look at the source for the reply page, you will see a form. The action of that form is the URL you want to send the post to. Then there is a hidden input with the name topic. The value of that is the topic. Lastly there is a hidden input named sc. The value of that is sc. Just put all that in the post request and it should post.

I made a Bitcointalk Android app a while back. You can reference its posting code if you need it. It should be relatively self-explanatory. The link to that specific posting code is here: https://github.com/achow101/BitcointalkForum/blob/master/app/src/main/java/com/achow101/bitcointalkforum/fragments/ReplyFragment.java#L406

Any idea why this isn't working?

achow101
Staff
Legendary
*
Offline Offline

Activity: 3542
Merit: 6886


Just writing some code


View Profile WWW
January 23, 2016, 11:47:13 PM
 #9

Any idea why this isn't working?
--snip img--
Check your cookies.

acegilz (OP)
Full Member
***
Offline Offline

Activity: 211
Merit: 100

1ACEGiLZnZoG7KUNkMwAT8tBuJ6jsrwj5Q


View Profile
January 24, 2016, 12:04:31 AM
 #10

Any idea why this isn't working?
--snip img--
Check your cookies.

what exactly should I do about the cookies? shouldn't "sc" be enought to identify the user?
achow101
Staff
Legendary
*
Offline Offline

Activity: 3542
Merit: 6886


Just writing some code


View Profile WWW
January 24, 2016, 12:07:26 AM
 #11

Any idea why this isn't working?
--snip img--
Check your cookies.

what exactly should I do about the cookies? shouldn't "sc" be enought to identify the user?
The cookie will give you authentication to post. Since I see that you are using Postman, you can get the postman interceptor and do a test post to see what goes into the post. Then just copy some of that data over like the cookie and some other stuff and you will see what you need to have in order to post.

Edit: The cookies go in headers and the actual data goes into the body, not as parameters.

acegilz (OP)
Full Member
***
Offline Offline

Activity: 211
Merit: 100

1ACEGiLZnZoG7KUNkMwAT8tBuJ6jsrwj5Q


View Profile
January 24, 2016, 12:21:44 AM
 #12

Any idea why this isn't working?
--snip img--
Check your cookies.

what exactly should I do about the cookies? shouldn't "sc" be enought to identify the user?
The cookie will give you authentication to post. Since I see that you are using Postman, you can get the postman interceptor and do a test post to see what goes into the post. Then just copy some of that data over like the cookie and some other stuff and you will see what you need to have in order to post.

Edit: The cookies go in headers and the actual data goes into the body, not as parameters.

Thank you so much for saving me a couple of hours!
acegilz (OP)
Full Member
***
Offline Offline

Activity: 211
Merit: 100

1ACEGiLZnZoG7KUNkMwAT8tBuJ6jsrwj5Q


View Profile
January 24, 2016, 12:26:19 AM
 #13

Just one more question, I used interceptor as you sugested and it grabbed the cookies from current browser, however I'm not sure how to send mannually the cookie param from another browser for example
achow101
Staff
Legendary
*
Offline Offline

Activity: 3542
Merit: 6886


Just writing some code


View Profile WWW
January 24, 2016, 12:29:06 AM
 #14

Just one more question, I used interceptor as you sugested and it grabbed the cookies from current browser, however I'm not sure how to send mannually the cookie param from another browser for example
Do you mean set the cookie in another browser? If so, I don't quite know how that works.

With the cookies, the only one that matters is PHPSESSID. You only need the value of that cookie in order to interact with the website as a logged in user.

achow101
Staff
Legendary
*
Offline Offline

Activity: 3542
Merit: 6886


Just writing some code


View Profile WWW
January 24, 2016, 12:40:53 AM
 #15

this is an auto message 2! /without cookies
Well it shouldn't work without cookies because you aren't authenticated (but I guess it does anyways). Anyways, you should delete your test posts to keep the spam down.

Edit: I stand corrected. You don't need cookies to post, just the sc which I suppose does the authentication for you.

acegilz (OP)
Full Member
***
Offline Offline

Activity: 211
Merit: 100

1ACEGiLZnZoG7KUNkMwAT8tBuJ6jsrwj5Q


View Profile
January 24, 2016, 12:46:42 AM
 #16

this is an auto message 2! /without cookies
Well it shouldn't work without cookies because you aren't authenticated (but I guess it does anyways). Anyways, you should delete your test posts to keep the spam down.

Edit: I stand corrected. You don't need cookies to post, just the sc which I suppose does the authentication for you.

They are required! Im trying to send them as header or something, if I dont use interceptor, only the sc the post doens't go
achow101
Staff
Legendary
*
Offline Offline

Activity: 3542
Merit: 6886


Just writing some code


View Profile WWW
January 24, 2016, 12:48:41 AM
 #17

this is an auto message 2! /without cookies
Well it shouldn't work without cookies because you aren't authenticated (but I guess it does anyways). Anyways, you should delete your test posts to keep the spam down.

Edit: I stand corrected. You don't need cookies to post, just the sc which I suppose does the authentication for you.

They are required! Im trying to send them as header or something, if I dont use interceptor, only the sc the post doens't go
Interesting. It just worked for me. Maybe it is because I am currently logged in. I will try clearing my cookies and logging and then trying again.

Edit: So you actually do need cookies. I think postman was taking the cookies from chrome which was why it was working for me.



To send the cookies as a header, in the headers tab, in the first box labeled Header, type:
Code:
Cookie
In the second box labeled Value type:
Code:
PHPSESSID=<value>
where <value> is the value of the cookie. You get this from either interceptor or in settings. In the settings, if you scroll down to Privacy and click on Content Settings... Then under cookies and click on All Cookies and Site Data. In the search box in the next window, type "bitcointalk". Click on "bitcointalk.org" then on the "PHPSESSID" button. The random string next to Content: is the value that you put in for PHPSESSID in the Cookie in the header.

acegilz (OP)
Full Member
***
Offline Offline

Activity: 211
Merit: 100

1ACEGiLZnZoG7KUNkMwAT8tBuJ6jsrwj5Q


View Profile
January 24, 2016, 12:58:12 AM
 #18

this is an auto message 2! /without cookies
Well it shouldn't work without cookies because you aren't authenticated (but I guess it does anyways). Anyways, you should delete your test posts to keep the spam down.

Edit: I stand corrected. You don't need cookies to post, just the sc which I suppose does the authentication for you.

They are required! Im trying to send them as header or something, if I dont use interceptor, only the sc the post doens't go
Interesting. It just worked for me. Maybe it is because I am currently logged in. I will try clearing my cookies and logging and then trying again.

Edit: So you actually do need cookies. I think postman was taking the cookies from chrome which was why it was working for me.

Yes, may be that!

Postman doesn't allow (you need interceptor to mess with cookies) but i think that for raw html requests it's possible to send cookies this way: http://stackoverflow.com/questions/3467114/how-are-cookies-passed-in-the-http-protocol
stzmc
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
January 27, 2016, 12:01:57 PM
 #19

are you still trying?
racquemis
Full Member
***
Offline Offline

Activity: 174
Merit: 100


View Profile
January 27, 2016, 12:03:51 PM
 #20

Write a bot that sends the proper HTTP Post requests to the forum in order to post.

Should be fairly easy to write
Pages: [1] 2 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!