Jump to content
McKay Development

Like screenshots


Includes

Recommended Posts

Oh i mean rate screenshots on steam community. For example this screenshot: https://steamcommunity.com/sharedfiles/filedetails/?id=388660226

 

Also i found https://github.com/SteamDatabase/SteamTracking/blob/e0e3e9b12c99401fe665376c74975274e8840625/Scripts/Community/sharedfiles_functions_logged_in.js but i don't know how to start. 

function VoteUp(item_id)
{
	if ( !$('VoteUpBtn').hasClassName( 'toggled' ) )
	{
		$('action_wait').show();
		var options = {
			method: 'post',
			postBody: 'id=' + item_id + '&sessionid=' + g_sessionID,
			onSuccess: (function(item_id){
				return function(transport)
				{
					$('action_wait').hide();

					if ( !CheckVoteResults( transport ) )
						return;

					ToggleChildItemVoteBtns( transport, true );

					var votesUpCount = $('VotesUpCount');
					if ( votesUpCount )
					{
						UpdateFormattedNumber( votesUpCount, 1 );
						$('VotesUpCountContainer').show();
					}

					$('VoteUpBtn').addClassName('toggled');
					$('VoteDownBtn').removeClassName('toggled');
					var voteLaterBtn = $('VoteLaterBtn');
					if ( voteLaterBtn )
					{
						voteLaterBtn.hide();
					}

					var blurb = $('rated_blurb');
					if( blurb != null )
						blurb.show();

					var next = $('voteNext');
					if( next != null )
						next.show();
				}
			}(item_id))
		};
		new Ajax.Request(
			'https://steamcommunity.com/sharedfiles/voteup',
			options
		);
	}
	return false;
}
Edited by Includes
Link to comment
Share on other sites

You should do POST request to "https://steamcommunity.com/sharedfiles/votedown" || "https://steamcommunity.com/sharedfiles/voteup" (example for this link "https://steamcommunity.com/sharedfiles/filedetails/?id=388660226")

let options = {
   url: "https://steamcommunity.com/sharedfiles/votedown" || "https://steamcommunity.com/sharedfiles/voteup",
   form: {
      id: 388660226, //screenshoot_id
      sessionid: 778dd9d24e7d325f2ca06af0//steam session id in cookies or you can take it when auth with node-steamcommunity  
   â€‹}
};

If you arre using node-steamcommunity do this steam.httpRequestPost(options) or you can use request but you should set up headers with cookies!

Edited by darkwar123
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...