Bitcoin Forum

Other => Meta => Topic started by: acegilz on January 23, 2016, 03:38:30 PM



Title: Auto Posting on this forum
Post by: acegilz on January 23, 2016, 03:38:30 PM
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!)


Title: Re: Auto Posting on this forum
Post by: achow101 on January 23, 2016, 03:41:12 PM
Write a bot that sends the proper HTTP Post requests to the forum in order to post.


Title: Re: Auto Posting on this forum
Post by: Jet Cash on January 23, 2016, 03:52:02 PM
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?


Title: Re: Auto Posting on this forum
Post by: traderbit on January 23, 2016, 03:52:41 PM
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.


Title: Re: Auto Posting on this forum
Post by: acegilz on January 23, 2016, 04:32:37 PM
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


Title: Re: Auto Posting on this forum
Post by: achow101 on January 23, 2016, 04:44:50 PM
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


Title: Re: Auto Posting on this forum
Post by: acegilz on January 23, 2016, 08:22:04 PM
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.


Title: Re: Auto Posting on this forum
Post by: acegilz on January 23, 2016, 11:42:37 PM
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?

https://i.imgur.com/4YnRFtE.png


Title: Re: Auto Posting on this forum
Post by: achow101 on January 23, 2016, 11:47:13 PM
Any idea why this isn't working?
--snip img--
Check your cookies.


Title: Re: Auto Posting on this forum
Post by: acegilz on January 24, 2016, 12:04:31 AM
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?


Title: Re: Auto Posting on this forum
Post by: achow101 on January 24, 2016, 12:07:26 AM
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.


Title: Re: Auto Posting on this forum
Post by: acegilz on January 24, 2016, 12:21:44 AM
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!


Title: Re: Auto Posting on this forum
Post by: acegilz on January 24, 2016, 12:26:19 AM
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


Title: Re: Auto Posting on this forum
Post by: achow101 on January 24, 2016, 12:29:06 AM
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.


Title: Re: Auto Posting on this forum
Post by: achow101 on January 24, 2016, 12:40:53 AM
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.


Title: Re: Auto Posting on this forum
Post by: acegilz on January 24, 2016, 12:46:42 AM
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


Title: Re: Auto Posting on this forum
Post by: achow101 on January 24, 2016, 12:48:41 AM
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.


Title: Re: Auto Posting on this forum
Post by: acegilz on January 24, 2016, 12:58:12 AM
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


Title: Redoing
Post by: stzmc on January 27, 2016, 12:01:57 PM
are you still trying?


Title: Re: Auto Posting on this forum
Post by: racquemis on January 27, 2016, 12:03:51 PM
Write a bot that sends the proper HTTP Post requests to the forum in order to post.

Should be fairly easy to write


Title: Re: Auto Posting on this forum
Post by: MedaR on January 28, 2016, 01:26:35 AM
This is not good idea! Soon we will have such a mess around here and this will be forbidden in no time.
So if you have spare time create something useful.
You won't get money from signatures via this way, they have certain rules, post must be a good quality. l doubt you can create smart bot, someone will notice irregularity, do not even bother yourself with this!