Closed mikebgrep closed 3 years ago
Mike Hadz, [05.01.21 12:22] Hello I have a request how to use hashtag_medias_recent() to query every time new results to skip allready liked posts I can do it to append hashtag id to a list and after this if hashtag id in list to skip but the point is every time to query new result.Its have that kind of argument
Mike Hadz, [05.01.21 14:04] Is hashtag_media_recent return anytime same result if I run it second time will skip the previouse results Thanks
Mikhail Andreev, [06.01.21 17:17] I can provide pagination interface with next_max_id. Is that okay? You yourself will decide whether to load a new page with posts or not. And create issue
Mike Hadz, [06.01.21 18:52] Yes that is ok I will create a issue
Any news about the improvement.
@mikebgrep I will try today
@adw0rd whats happening it will have a solution.
I suppose is not have working solution so to close the issue
@mikebgrep use hashtag_medias_a1_chunk
or hashtag_medias_v1_chunk
for pagination
https://adw0rd.github.io/instagrapi/usage-guide/hashtag.html
>>> cl = Client()
>>> cl.login(username, password)
>>> medias, cursor = cl.hashtag_medias_v1_chunk('test', max_amount=32, tab_key='recent')
>>> len(medias)
32
>>> cursor
QVFDR0dzT3FJT0V4amFjMaQ3czlGVzRKV3FNWDJqaE1mWmltWU5VWGYtbnV6RVpoOUlsR3dCN05RRmpLc2R5SVlCQTNaekV5bUVOV0F4Vno1MDkxN1Nndg==
# NEXT cursor:
>>> medias, cursor = cl.hashtag_medias_v1_chunk('test', max_amount=32, tab_key='recent', max_id=cursor)
>>> len(medias)
32
>>> cursor
QVFEUXpfM0RtaDdmMExPQ0k0UWRlaHFJa2RVdVlaX01LTzhkNF9Dd1N2UlhtVy1vSTZvMERfYW5XN205OTBRNFBCSVJ2ZTVfTG5ZMXVmY0VJbUM5TU9URQ==
@mikebgrep use
hashtag_medias_a1_chunk
orhashtag_medias_v1_chunk
for pagination https://adw0rd.github.io/instagrapi/usage-guide/hashtag.html>>> cl = Client() >>> cl.login(username, password) >>> medias, cursor = cl.hashtag_medias_v1_chunk('test', max_amount=32, tab_key='recent') >>> len(medias) 32 >>> cursor QVFDR0dzT3FJT0V4amFjMaQ3czlGVzRKV3FNWDJqaE1mWmltWU5VWGYtbnV6RVpoOUlsR3dCN05RRmpLc2R5SVlCQTNaekV5bUVOV0F4Vno1MDkxN1Nndg== # NEXT cursor: >>> medias, cursor = cl.hashtag_medias_v1_chunk('test', max_amount=32, tab_key='recent', max_id=cursor) >>> len(medias) 32 >>> cursor QVFEUXpfM0RtaDdmMExPQ0k0UWRlaHFJa2RVdVlaX01LTzhkNF9Dd1N2UlhtVy1vSTZvMERfYW5XN205OTBRNFBCSVJ2ZTVfTG5ZMXVmY0VJbUM5TU9URQ==
I used this method but it returns None for cursor, thank you for your guidance me on this matter.
It will be great to load every next query in post when you load from hashtag.