ynet.co.il interaction library


Keywords
pypi, python, python3
License
WTFPL
Install
pip install ynet==1.7.2

Documentation

python-ynet

A Python library that allows you to post and view comments on news articles from ynet.co.il.
Standalone .py releases are at https://github.com/sl4vkek/python-ynet/releases.

Installation

Install from PyPi

On windows: py -m pip install ynet requests

On linux:

$ sudo apt-get install -y python3 python3-pip
$ pip3 install ynet requests

Install from source

On linux:

$ git clone https://github.com/sl4vkek/python-ynet.git
$ cd python-ynet
$ python3 setup.py install

Data

The following is data for developers so you could better understand how this library works.

API Endpoints

API endpoint Purpose GET / POST Form Data Query data Implementable
(ynet.co.il)/Ext/Comp/ArticleLayout/Proc/ShowTalkBacksAjax/v2/0,12990,(article id)-desc-68-0-1,00.html Retrieve Comments GET Y
(ynet.co.il)/YediothPortal/Ext/TalkBack/CdaTalkBackTrans/0,2499,(article id)-0-68-546-0---0,00.html Post a Comment POST WSGBRWSR (keep this to FF), name, email, Location, title, description Y
(ynet.co.il)/YediothPortal/Ext/TalkBack/CdaTalkBackTrans/0,2499,(article id)-0-68-13108-0---(comment id),00.html Post a Reply POST WSGBRWSR (keep this to FF), name, email, Location, title, description Y
(ynet.co.il)/Ext/Comp/ArticleLayout/Proc/ShowTalkBacksAjaxNC2/0,12979,L-recmm-(article id (no L-))-(comment id)-68-1,00.html Like a Comment GET RN (?) N
(ynet.co.il)/Ext/Comp/ArticleLayout/Proc/ShowTalkBacksAjaxNC2/0,12979,L-recmm-(article id (no L-))-(comment id)-68-0,00.html Dislike a Comment GET RN (?) N
(ynet.co.il)/Ext/Comp/ArticleLayout/Proc/ShowTalkBacksAjax/v2/0,12990,L-artinfo-(article id (no L-))-68,00.html Retrieve Statistics on Comments GET Y

Retrieving an Article's ID

the article ID is usually between the 2nd and 3rd comma.
alt text
Note that sometimes you need to remove "L-" in order to properly send the request.