S
S
Sergey2016-03-11 12:05:21
PowerShell
Sergey, 2016-03-11 12:05:21

Why is the time of publication of news in VK incorrectly displayed during automation?

When adding a timer to a news publication, I assign a value to the calendar and time.
222fa1e621fa4da2a67aff642759a835.jpg
I found three parameters that could be responsible for the time:

Document.getElementsByclassName('resultField').value
Document.getElementsByclassName('selector_input selected').value
Document.getElementById('postpone_time1').value

But when you call the publication method, the time value that was originally selected when adding the calendar is still assigned. In the figure, the news will be published at 19:25.
fea81a5f8c8a49eca9a0980fe8aede1c.jpg
The defaultvalue for the "selectedItems" class, which owns the dropdown list, also changed. But there is an option that there is some method that should work, but I can't find it.
Thank you very much for your help.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
azarij, 2016-03-12
@Jeisooo

Have you tried fidlerom to intercept the traffic and see what the browser sends when you manually fill out and submit the form?

S
Sergey, 2016-03-15
@Jeisooo

The task is solved through the official vk.com API.
1. create a stand-alone application
2. get a token:
The token will be in the address bar
3. form a request to the API via invoke-webrequest

$token = your_token #str
$uri = "https://api.vk.com/method/wall.post?owner_id=-YOUR_PAGE&message=test&publish_date=1458120019&v=5.5&access_token=$token"
$requ = Invoke-WebRequest -Uri $uri -Method get

Method documentation: wall.post

D
Danil Sapegin, 2016-03-11
@ynblpb_spb

Maybe you have some problem with timezones? Check the local settings on the computer and those specified in the VK settings ..

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question