mercuree / html-telegraph-poster

Python html to telegra.ph poster (telegram article service)
MIT License
100 stars 31 forks source link

Article updated instead of posted #7

Closed JohnChu101 closed 5 years ago

JohnChu101 commented 5 years ago

I always use post method to post new articles. but very often my old post (previous one) is updated, instead of being posted as a new article with new link.

mercuree commented 5 years ago

This is probably an incorrect behavior and can be changed in future. For now you have to create TelegraphPoster instance every time you want to post a new page.

JohnChu101 commented 5 years ago

my code:

>>> from html_telegraph_poster import TelegraphPoster
>>> t = TelegraphPoster(access_token=access_token)
>>> t.post(title="AAA", author='oo', author_url='http://reuters.com', text='<br><br><em>AAA</em>')
{'path': 'AAA-08-14', 'url': 'http://telegra.ph/AAA-08-14'}
>>> t.post(title="BBB", author='op', author_url='http://reuters.com', text='<br><br><em>BBB</em>')
{'path': 'AAA-08-14', 'url': 'http://telegra.ph/AAA-08-14'}

@mercuree ok i see!