How many days ago did my followers post the last content ?steemCreated with Sketch.

in #utopian-io6 years ago (edited)


thank you @steinhammer for the graphic

Repository

https://github.com/steemit/steem-python

What Will I Learn?

Hello everyone Let's start today I'll show you how many days ago when did my or your followers the last post content with python ,idea of this script by @captainsailor thank you cap.

  • You will learn python functions
  • You will learn Blog class ,Account class and Steem class with steem-python library
  • you will learn to get follower information with Account class.

Requirements

  • python 3.6
  • steem-python library

Difficulty

  • Basic

Tutorial Contents

Create a file called main.py

First we will use it in our project and add libraries and variables, these Steem class and Blog class and Let's set steem node.

from steem import Steem
from steem.blog import Blog
from steem.account import Account

STEEM = Steem(nodes=['https://api.steemit.com'])

You can use other nodes.

Write a function for it named follow_the_last_post and take a parameters as username, I set username to captainsailor by default. Later we find the followers to use Account class and we find their last post and post's time to use Blog class finally it will return this variable.

check the codes below

def follow_the_last_post(username = "captainsailor"):
    for account_name in Account(username, STEEM).get_following():
        last_post = Blog(account_name = account_name).take(1)
        try:
            post_time_elapse = last_post[0].time_elapsed()
            days = post_time_elapse.days
            yield dict(
                account_name = account_name,
                url = last_post[0].url,
                days = days,
            )
        except IndexError:
            yield "{} user has never shared content".format(account_name)

You can run the script this way

for i in follow_the_last_post():
    print(i)

I hope you can tell, if there are sections you do not understand, you can ask in comments see you.

Result .

abusehunt user has never shared content
{'account_name': 'ademkrgl', 'url': '/tr/@ademkrgl/salkiintermalsu-8vf3tlpjo8', 'days': 0}
{'account_name': 'ahmetmertugrul', 'url': '/creativecrypto/@ahmetmertugrul/crypto-art-challenge-cardano-edition-my-entry-b6a0995fe3934', 'days': 49}
{'account_name': 'akkoca42', 'url': '/tr/@akkoca42/lev-tolstoy-insan-her-zaman-oezguerduer', 'days': 96}
{'account_name': 'alpertr', 'url': '/steempress/@alpertr/logout-536y321wwc', 'days': 0}
{'account_name': 'anadolu', 'url': '/tr/@anadolu/yoyow-yoyo-hakkinda', 'days': 5}
{'account_name': 'arafs', 'url': '/tr/@arafs/tr-etiketi-haftalk-rapor-0406-1006-1528971708', 'days': 3}
{'account_name': 'arvex', 'url': '/introduceyourself/@arvex/hello-i-am-arvex', 'days': 19}
{'account_name': 'asenakorkut', 'url': '/tr/@asenakorkut/aagari-uecret-meselesi', 'days': 1}
{'account_name': 'atacapella', 'url': '/tr/@atacapella/cocuklar-icin-robotik-kodlama-robotic-coding-for-children', 'days': 1}
{'account_name': 'atalente', 'url': '/tr/@atalente/gobaba-ya-getirdigim-arkadaslarim-cpxturk-and-gobaba-projesi', 'days': 3}
{'account_name': 'avina', 'url': '/tr/@avina/oenyargi-bir-tuer-kimlik-sunumudur', 'days': 0}
{'account_name': 'bahriyeli', 'url': '/tr/@bahriyeli/pamukkale-2018-5-0-11-19-3', 'days': 7}
{'account_name': 'baycan', 'url': '/dmania/@baycan/what-is-this-pleace-zg1hbmlh-muthk', 'days': 0}
{'account_name': 'biriki3', 'url': '/tr/@biriki3/sanssiz-feslegen-kayboldu', 'days': 0}
{'account_name': 'bluesky6', 'url': '/steempress/@bluesky6/passwordreset-y6w2hdnv94', 'days': 0}
{'account_name': 'bumper', 'url': '/bumper/@bumper/bumper-update-the-future-of-bumper-switching-gears', 'days': 28}
{'account_name': 'bunnypuncher', 'url': '/cat/@bunnypuncher/caturday-update-on-our-new-cat-she-s-an-art-lover-lol', 'days': 0}
{'account_name': 'bybrawe', 'url': '/tr/@bybrawe/cointurk-haftalik-is-raporu-17-06-2018', 'days': 0}
{'account_name': 'camal', 'url': '/hede-io/@camal/miqrant-emiqrant-v-immiqrant', 'days': 0}
{'account_name': 'candyboy', 'url': '/crypto/@candyboy/watching-huobi-streaming-and-get-an-airdrop', 'days': 3}
{'account_name': 'canku', 'url': '/life/@canku/bursa-view', 'days': 45}
{'account_name': 'cashthekush', 'url': '/dlive/@cashthekush/0aa1e905-6f53-11e8-8fb4-0242ac110002', 'days': 3}
{'account_name': 'catwolff', 'url': '/tr/@catwolff/anneler-guenue-uezerine', 'days': 36}
{'account_name': 'chorock', 'url': '/sportsphotography/@chorock/jumping-into-the-sea', 'days': 0}
{'account_name': 'chronocrypto', 'url': '/steempress/@chronocrypto/adonaldmarshallinspiredstory-iuw10pu9sr', 'days': 0}
{'account_name': 'cpxturk', 'url': '/cointurk/@cpxturk/pazarlama-reklam-ekibimize-cok-sayida-calisan-alinacaktir', 'days': 9}
{'account_name': 'cpxturk-destek', 'url': '/cointurk/@cpxturk-destek/promote-nedir-nasil-kullanilir-ve-avantajlari-nelerdir', 'days': 1}
{'account_name': 'cyberyunus', 'url': '/steemhunt/@cyberyunus/mediam-exhibitions-of-painting-works', 'days': 1}
{'account_name': 'dangerux', 'url': '/tr/@dangerux/bilmemiz-gereken-faydali-bilgiler-8', 'days': 0}
{'account_name': 'dlive', 'url': '/dlive/@dlive/campaign-or-celebrate-father-s-day-with-dlive', 'days': 0}
{'account_name': 'doctorbishop', 'url': '/tr/@doctorbishop/rahatsiz-edici-bir-paylasim', 'days': 0}
{'account_name': 'drfrostgirl', 'url': '/tr/@drfrostgirl/hoscakalin-ve-iyi-bayramlar', 'days': 1}
{'account_name': 'dsound', 'url': '/void/@dsound/another-post-to-increase-dsound-reputation-to-fight-abuse', 'days': 65}
{'account_name': 'e-babil', 'url': '/dlive/@e-babil/7a8411d0-590e-11e8-bcd6-3ffd583ab4ab', 'days': 31}
{'account_name': 'edebiyat', 'url': '/tr/@edebiyat/nusirevan-i-adil-iv-boeluem', 'days': 0}
{'account_name': 'embesilikat', 'url': '/tr/@embesilikat/canim-koal-im-koal-discord-sunucusu-uezerine', 'days': 43}
{'account_name': 'enigmatic', 'url': '/travel/@enigmatic/italya-da-gezilebilecek-yerleri-goerelim', 'days': 0}
{'account_name': 'ercu', 'url': '/hede-io/@ercu/hede-de-azerbaycan-tuerkcesi-olarak-acilan-basliklarin-bir-ikilem-yasatmasi', 'days': 10}
{'account_name': 'eyupyusuf', 'url': '/dngo-io/@eyupyusuf/halime-kaptan-2-bolumun-ortasi-1528923819', 'days': 3}
{'account_name': 'ferow', 'url': '/blog/@ferow/a-warning-for-everyone-that-will-travel-to-turkey-or-other-eastern-countries-food-poisoning', 'days': 30}
{'account_name': 'feryuse', 'url': '/tr/@feryuse/pythagoras-in-tabulari-taboos-of-pythagoras', 'days': 4}
{'account_name': 'flagship', 'url': '/flagship/@flagship/flagship-daily-status-report-june-16-2018-250-return-upvotes-and-current-queue', 'days': 0}
{'account_name': 'gcamkerten', 'url': '/dram/@gcamkerten/22-guen', 'days': 28}
{'account_name': 'gizemk', 'url': '/tr/@gizemk/anneler-guenue', 'days': 34}
{'account_name': 'gokhan83kurt', 'url': '/tr/@gokhan83kurt/kindar-e40691290bd4a', 'days': 0}
{'account_name': 'golge', 'url': '/tr/@golge/gnlk-14062018-1528971790', 'days': 2}
{'account_name': 'good-karma', 'url': '/esteem/@good-karma/new-curators-to-support-esteem-users-a55547ea9c17', 'days': 6}
{'account_name': 'hakancelik', 'url': '/utopian-io/@hakancelik/firstup-how-can-i-make-steembottracker-s-front-run-the-bots-with-python', 'days': 1}
{'account_name': 'harshilpatel', 'url': '/dtubedaily/@harshilpatel/apidxr29', 'days': 1}
{'account_name': 'hkmusic', 'url': '/steemgar/@steemplayroom/steemgar-game-1529096009830#@hkmusic/hkmusic1529096699344', 'days': 1}
hwawol user has never shared content
{'account_name': 'ilkeryilmaz', 'url': '/tr/@ilkeryilmaz/gobaba-kyc-islemi-tamamlanmasi', 'days': 5}
{'account_name': 'irinead', 'url': '/tr/@irinead/cin-biberimsi-9eb6da15fb369', 'days': 4}
{'account_name': 'jumbot', 'url': '/jumbot/@jumbot/jumbot-guenluek-rapor-115-guenuen-en-jumbo-yazilari', 'days': 0}
{'account_name': 'kagantrky', 'url': '/cointurk/@kagantrky/cointurk-haftalik-kueratoer-raporu-weekly-cointurk-curator-report-13-06-2018', 'days': 3}
{'account_name': 'kamuhuzuru', 'url': '/tr/@kamuhuzuru/e-hadi-ama', 'days': 0}
{'account_name': 'kedi', 'url': '/steemstem/@kedi/fantastic-organic-chemistry', 'days': 35}
{'account_name': 'kusadasi', 'url': '/cointurk/@kusadasi/bir-cok-dolar-kazanabileceginiz-projelerimiz-devam-ediyor', 'days': 0}
{'account_name': 'kutalp', 'url': '/tr/@kutalp/bir-upvote-tusuna-basmak-bu-kadar-mi-zor', 'days': 52}
{'account_name': 'lakethefire', 'url': '/tr/@lakethefire/account-md3x4c56eb', 'days': 0}
{'account_name': 'lessismoring', 'url': '/cointurk/@lessismoring/ramazan-yardimlasma-ayi-cointurk-30-projesi-lessismoring-0436', 'days': 19}
{'account_name': 'lightshield', 'url': '/tr/@lightshield/zuerafalar-5c0d3387cfc97', 'days': 6}
{'account_name': 'mahfi', 'url': '/tr/@mahfi/yok-ol-be-kadin-yok-ol', 'days': 2}
{'account_name': 'mahsumakbas', 'url': '/tr/@mahsumakbas/genesis-mining-yeni-btc-contract-acti', 'days': 0}
{'account_name': 'maloalejandro', 'url': '/spanish/@maloalejandro/is-a-false-say-to-cristiano-ronaldo-or-es-una-mentira-le-dijeron-a-cristiano-ronaldo', 'days': 1}
{'account_name': 'minnowbooster', 'url': '/minnowbooster/@minnowbooster/minnowbooster-answering-questions-and-engaging-with-the-steem-community', 'days': 1}
{'account_name': 'minnowhelper', 'url': '/contest/@minnowhelper/13-minnowhelper-writing-contest-and-winners-from-the-12-writing-contest', 'days': 4}
{'account_name': 'monomyth', 'url': '/dlive/@krypted/0436fc14-3f45-11e8-9f5b-0242ac110002#@monomyth/0ddac110-3f4a-11e8-9fb9-1b6b05d958f1', 'days': 64}
{'account_name': 'mucar38', 'url': '/tr/@mucar38/bayramdnvetrafik-fly1jc79tw', 'days': 0}
{'account_name': 'muratkbesiroglu', 'url': '/steemit/@muratkbesiroglu/11-applications-i-use-along-with-steemit-com-english-turkish', 'days': 0}
{'account_name': 'murattatar', 'url': '/hede-io/@murattatar/oppenheimer-in-cennete-gitmesi', 'days': 0}
{'account_name': 'netknight', 'url': '/tr/@netknight/duenya-kupasi-nda-2-guen-nasil-gecti', 'days': 1}
{'account_name': 'obulunmaz', 'url': '/tr/@obulunmaz/anlamakta-israrciyiz', 'days': 3}
{'account_name': 'oguzcan', 'url': '/tr/@oguzcan/steemit-e-neden-baslamaliyim', 'days': 0}
{'account_name': 'omersurer', 'url': '/tr/@omersurer/kalemimdenszlenler5-aasbfc8zfo', 'days': 0}
{'account_name': 'onlinegamer', 'url': '/cointurk/@onlinegamer/cointurk-haftalik-is-raporum-10-17-haziran-2018', 'days': 0}
{'account_name': 'osmania', 'url': '/tr/@osmania/gobaba-ueyelik-islemi-cpxturk-and-gobaba-projesi', 'days': 0}
{'account_name': 'pars11', 'url': '/dlive/@pars11/a49b9ed4-7179-11e8-8fb4-0242ac110002', 'days': 0}
{'account_name': 'peri', 'url': '/tr/@peri/yorum-etkinligi-en-iyi-yorum-oeduelue-1-sbd', 'days': 0}
{'account_name': 'photographericy', 'url': '/photography/@photographericy/travel-photography-series-by-photographericy-57-1528996436', 'days': 2}
{'account_name': 'pinarhanpolat', 'url': '/tr/@pinarhanpolat/suekran', 'days': 3}
{'account_name': 'propofol', 'url': '/cointurk/@propofol/gobaba-cpxturk-and-gobaba-projesi-propofol-4503', 'days': 8}
{'account_name': 'punky', 'url': '/tr/@punky/whatsapp-pearl-jam-ve-kolayi-tercih-etmek', 'days': 3}
{'account_name': 'queqtra', 'url': '/tr/@queqtra/tr-eng-irritabl-bagirsak-sendromu-irritable-bowel-syndrome', 'days': 0}
{'account_name': 'quraturk', 'url': '/tr/@quraturk/quraturk-secilen-yazilar-or-selected-posts-14-06-2018', 'days': 2}
{'account_name': 'ramta', 'url': '/super8ballclub/@ramta/wow-super8ballclub-is-here-at-steemit-verification', 'days': 46}
{'account_name': 'readmore', 'url': '/tr/@readmore/lloret-de-mar-castell-de-sant-joan', 'days': 47}
{'account_name': 'ruen', 'url': '/dlive/@ruen/5450fa90-7147-11e8-8587-fb4bcb1f0470', 'days': 1}
{'account_name': 'sahinadm', 'url': '/tr/@sahinadm/nihayet-steem-try-islemi-yapabilecegiz-cpxturk-and-gobaba-projesi', 'days': 0}
{'account_name': 'sauronbey', 'url': '/tr/@sauronbey/tuerk-lirasi-ile-steem-almak-cok-daha-kolay-cpxturk-and-gobaba-projesi', 'days': 7}
{'account_name': 'sedatcelik', 'url': '/dlive/@sedatcelik/37ac6f10-71be-11e8-b988-0242ac110002', 'days': 0}
{'account_name': 'selinnball', 'url': '/photography/@selinnball/grafiti-sanati-art-of-graffiti', 'days': 11}
{'account_name': 'shubaca430', 'url': '/contest/@shubaca430/a-view-from-the-window-contest', 'days': 1}
smartmarket user has never shared content
{'account_name': 'sorucevap', 'url': '/tr/@sorucevap/minnowsupport-nasil-kullanilir', 'days': 9}
{'account_name': 'steempress-io', 'url': '/steempress/@steempress-io/steempress-answers-to-common-questions-and-update-to-design', 'days': 4}
{'account_name': 'steinhammer', 'url': '/davinci-application/@steinhammer/lm-application-davinci-witness-project', 'days': 4}
{'account_name': 'sudefteri', 'url': '/tr/@sudefteri/dostum-degil-uykular', 'days': 2}
{'account_name': 'supermarioo', 'url': '/kusadasi/@supermarioo/6s6iq7-scorp', 'days': 2}
{'account_name': 'tahirozgen', 'url': '/tr/@tahirozgen/si-iz-kreyzi-layk-hoer-dedi-ya-da-baba', 'days': 0}
{'account_name': 'thundercurator', 'url': '/steemit/@thundercurator/changes-to-thundercurator-services-effective-june-17th-2018-introducing-tier-based-upvoting-system', 'days': 0}
{'account_name': 'tipu', 'url': '/steemit/@tipu/investors-report-12-06-2018-limiting-invest-reinvest-option', 'days': 4}
{'account_name': 'tolgahanuzun', 'url': '/tr/@tolgahanuzun/yurt-disi-planlari-1', 'days': 0}
{'account_name': 'trcleaners', 'url': '/trcleaners/@trcleaners/trcleaners-faaliyet-raporu-1', 'days': 2}
{'account_name': 'try-market', 'url': '/kusadasi/@try-market/6qcaq1-guenluek-steem-fiyati', 'days': 0}
{'account_name': 'tulpar', 'url': '/dlive/@tulpar/c50f0efd-6811-11e8-ba6c-0242ac110003', 'days': 12}
{'account_name': 'turkauthor', 'url': '/tr/@turkauthor/istifham-nedir-yazmanin-incelikleri-serisi', 'days': 22}
{'account_name': 'turkce-bilim', 'url': '/tr/@turkce-bilim/duyuru-and-tesekkuer', 'days': 1}
{'account_name': 'tutku', 'url': '/hede-io/@tutku/erken-secim-2018', 'days': 34}
{'account_name': 'ugurarslanboga', 'url': '/colorchallenge/@ugurarslanboga/colorchallenge-sunday-purple-068c978b53ee9', 'days': 0}
{'account_name': 'uzercanan', 'url': '/dmania/@uzercanan/makeup-ability-zg1hbmlh-o8ka3', 'days': 0}
{'account_name': 'whitecollar', 'url': '/tr/@whitecollar/cointurk-haftalik-raporum-or-17-06-2018', 'days': 0}
{'account_name': 'yallapapi', 'url': '/steem/@yallapapi/just-another-hype-post-nothing-to-see-here-move-along', 'days': 8}
{'account_name': 'yasujizr', 'url': '/utopian-io/@yasujizr/new-logo-for-hiper', 'days': 5}
{'account_name': 'yesnomaybe', 'url': '/steemgar/@steemplayroom/steemgar-game-1529180609815#@yesnomaybe/yesnomaybe1529181297233', 'days': 0}
{'account_name': 'yunustkty', 'url': '/tr/@yunustkty/merhaba-tarih-severler-9c22a66002302', 'days': 1}
{'account_name': 'zoltarian', 'url': '/tr/@zoltarian/imar-barisi-ile-ilgili-bilgilendirme', 'days': 3}

Curriculum

Proof of Work Done

https://gist.github.com/hakancelik96/3b72a320cdd1059ed2eddba29bd939ba

Sort:  

Hocam GitHub'tan taşınmayı düşünüyor musun?

github'ı çok sevdiğim için şuanlık düşünmüyorum, yaptığım bütün çalışmalar zaten açık kaynak bir sorun olacağını düşünmüyorum, olursa belki o zaman değiştiririm, sizin bu konuda düşünceleriniz neler ?

El değiştirme sonrası düşüncelerim şöyle

Öyle çok profesyonel kodlarım yok ama yine de microsoft'un; hotmail'den nokia'ya skype'tan windows10'a el attığı şeyleri amorf bir hale getirdiği düşünülürse, taşınacağım kesin.
Ama nereye, ona henüz karar vermedim.

Hi, good work !
It would be great to have a visual representation of the data (distribution of followers by last post in days). It would allow to see with just a glance if most of the followers are active or not.

Hi thanks ,it can definitely developing, interface can be made, use can be presented to steem's users, maybe another day I can develop.

No pressure !
And maybe not a real interface, juste a little something with matplotlib could be great !

Hm I understand, yes it can be.

It would be amazing yes. I hope we will see this soon :)

Loading...

pek çok kişinin merak edeceği harika bir çalışma olmuş, elinize sağlık.

Teşekkürler 🙃 👍

Thank you for your contribution.
While I liked the content of your contribution, I would still like to extend few advices for your upcoming contributions:

  • Tutorial content: There are parts of the code that have little explanation, try to explain as much as possible.
  • Try to make the tutorial longer with everything explained in detail.

Looking forward to your upcoming tutorials.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thank you for your interest, I'm glad you to like my content. I will follow your advices in future contributions and I will try to do a better job 👍.

Hey @hakancelik
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Contributing on Utopian
Learn how to contribute on our website or by watching this tutorial on Youtube.

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

we have been notified by the owner of the graphic (@emrebeyler) that you are using it as a header of your posts without proper credit nor prior permissions.
Please avoid using it in the future till you get proper confirmation from the owner.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

I did not know that, I am changing the picture

Coin Marketplace

STEEM 0.17
TRX 0.15
JST 0.028
BTC 58130.32
ETH 2361.48
USDT 1.00
SBD 2.38