You are here

Request Payload on Post Data

5 posts / 0 new
Last post
kvanc
Offline
WG++ Team memberDonator
Joined: 10 months
Last seen: 1 hour
Request Payload on Post Data

Hello guys;

I am not sure about location of topic and I may remove/move if it is not in correct place. I'm working on a ini file for several hours and didn't make it work(not even started).

https://web.tvplus.com.tr/tv

This is the address of website and I copied my ini(not working) for more details. Basicly, site is working with POST request but post_data(which contains urldate and channelid) is coming as "request payload" instead of common "form data" which is my main suspect. This is exp. the post data;

{"type":"2","channelid":"89","begintime":"20180710210000","endtime":"20180711205959"}

I tried to rename it as " type=2&channelid=89..etc. " or setting "Content-Type: application/x-www-form-urlencoded" with no luck. I just want to learn webgrab can handle this kind of post datas or is there any another problem that I have to deal.

Not: I tested on Linux and Win7

kvanc
Offline
WG++ Team memberDonator
Joined: 10 months
Last seen: 1 hour

Hi Blackbear;

Thanks for reply. I tried to add some header, created cookie file but none of them work.Also I check what u explained above for debugging and saw

"retcode":"-2",
"desc":"User's session has been expired, please relogin EPG.",
"errorCode":"85983527"

So I tried to preload some adresses which seems to related with authentication and applied credentials, mainly this address

https://portal56.turkcelltvplus.com.tr:33207/EPG/JSON/Authenticate .It normally gives "retcode 0" with "username=guest" and "password=db90e7eb"(always same) on browser but didnt work as well.

Only thing that I havent tried, is php script which is a challenge that I cannot accept now. Anyway thanks again for your help.I will keep watching website.Maybe I can find a different way to make it work

kvanc
Offline
WG++ Team memberDonator
Joined: 10 months
Last seen: 1 hour

Hmm.. that's interesting because in documentation.pdf, there is an example for url_preload with post request(Clause 4.4.3.1).I applied actually same thing but catching some part from preloaded url is a thing that I have never succeed. As far as I know index_variable_element or any global/temp elements are not working with preload...

But I remember one of your ".sh" file for a website tring.al to grab some part of preload page which will be used on next stage.So something like this may work but I guess still that data needs to be converted cookie while post-data has no space for sessionid

kvanc
Offline
WG++ Team memberDonator
Joined: 10 months
Last seen: 1 hour

Thanks blackbear.Then I will focus on catching and saving that cookie file. I think similar setup as I mentioned about your .sh file for another site, may work.Instead of preload, I am planning to call that authentication page from inside of wg(type=run) with a sh script via wget(maybe curl - I am not so sure about "post" with wget) and
--save-cookies cookies.txt \
--keep-session-cookies \
--post-data
options then try to request epg page with that cookie file but I'm not so sure about sequence..Loadcookie option shall be defined on site options of ini. so wg may try to check cookie file before requesting required one..(or I am wrong).Anyway I will try when I find some free time.

kvanc
Offline
WG++ Team memberDonator
Joined: 10 months
Last seen: 1 hour

Finally with curl..I was trying it with wget for 2 days but cannot catch the epg page with cookie file that I saved from auth page. Thanks blackbear, now i will write a script for wg to grab epg data

Log in or register to post comments

Brought to you by Jan van Straaten

Program Development - Jan van Straaten ------- Web design - Francis De Paemeleere
Supported by: servercare.nl