Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/meatyite/python-ynet
A Python library that allows you to post and view comments on news articles from ynet.co.il and ynetnews.com (Now on PyPi!)
https://github.com/meatyite/python-ynet
pypi python python3
Last synced: about 1 month ago
JSON representation
A Python library that allows you to post and view comments on news articles from ynet.co.il and ynetnews.com (Now on PyPi!)
- Host: GitHub
- URL: https://github.com/meatyite/python-ynet
- Owner: meatyite
- License: wtfpl
- Created: 2019-05-08T15:05:50.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-28T06:17:20.000Z (about 5 years ago)
- Last Synced: 2024-10-07T23:24:12.043Z (about 1 month ago)
- Topics: pypi, python, python3
- Language: Python
- Homepage:
- Size: 81.1 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# 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](https://i.imgur.com/zLUrbmG.png)
Note that sometimes you need to remove "L-" in order to properly send the request.