instalike-instagram-bot icon indicating copy to clipboard operation
instalike-instagram-bot copied to clipboard

ERROR SCARPING FEED

Open Oyetomi opened this issue 7 years ago β€’ 12 comments

Due to recent instagram changes , am unable to scrape feed with the bot ,,,, i keep getting this error File "/home/shoutoutsng/instabot.py", line 76, in start self.like_bot.act() File "/home/shoutoutsng/instalike.py", line 54, in act media = self.content_manager.get_next_media() File "/home/shoutoutsng/content.py", line 34, in get_next_media if(not self.scrap_media()): File "/home/shoutoutsng/content.py", line 83, in scrap_media response = self.scrap_feed_media() or response File "/home/shoutoutsng/content.py", line 101, in scrap_feed_media feed_media = self.operation.get_feed_media() File "/home/shoutoutsng/operation.py", line 167, in get_feed_media json_feed = json.loads(feed_media.group(1))['entry_data']['FeedPage'][0]['feed']['media']['nodes'] KeyError: 'feed'`

Oyetomi avatar Mar 01 '17 16:03 Oyetomi

i think ['feed']['media']['nodes'] is no longer valid .... i changed it to ['graphql']['user']['edge_web_feed_timeline']['edges'] in operation.py in line 167

but got this error

File "/home/shoutoutsng/content.py", line 34, in get_next_media if(not self.scrap_media()): File "/home/shoutoutsng/content.py", line 83, in scrap_media response = self.scrap_feed_media() or response File "/home/shoutoutsng/content.py", line 103, in scrap_feed_media return self.process_media(feed_media) File "/home/shoutoutsng/content.py", line 109, in process_media media_details = self.operation.get_photo_details(media['code']) KeyError: 'code'

Oyetomi avatar Mar 01 '17 16:03 Oyetomi

try it out, should be working Instagram changed their json response with feed media. πŸ‘

mpawlak2 avatar Mar 03 '17 18:03 mpawlak2

Yes works fine,,, Sorry for disturbing... It get pictures on feed randomly,, I want it to get only recently uploaded picture,,, keep Scraping until it finds a new one,,, On Mar 3, 2017 7:37 PM, "Mateusz Pawlak" [email protected] wrote:

try it out, should be working Instagram changed their json response with feed media. πŸ‘

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mpawlak2/instalike-instagram-bot/issues/21#issuecomment-284034289, or mute the thread https://github.com/notifications/unsubscribe-auth/AUPGkvk5xaaJWCmVULsMEmVAEEsUPCEaks5riF3WgaJpZM4MP2oV .

Oyetomi avatar Mar 08 '17 16:03 Oyetomi

How can I fix this please :( On Mar 8, 2017 5:22 PM, "Abiodun Oyetomi" [email protected] wrote:

Yes works fine,,, Sorry for disturbing... It get pictures on feed randomly,, I want it to get only recently uploaded picture,,, keep Scraping until it finds a new one,,, On Mar 3, 2017 7:37 PM, "Mateusz Pawlak" [email protected] wrote:

try it out, should be working Instagram changed their json response with feed media. πŸ‘

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mpawlak2/instalike-instagram-bot/issues/21#issuecomment-284034289, or mute the thread https://github.com/notifications/unsubscribe-auth/AUPGkvk5xaaJWCmVULsMEmVAEEsUPCEaks5riF3WgaJpZM4MP2oV .

Oyetomi avatar Mar 08 '17 16:03 Oyetomi

Well it works that way if i remember correctly so it is not about fixing but rather scripting new functionality.

W dniu Ε›r., 8.03.2017 o 17:32 virginsince1997 [email protected] napisaΕ‚(a):

How can I fix this please :( On Mar 8, 2017 5:22 PM, "Abiodun Oyetomi" [email protected] wrote:

Yes works fine,,, Sorry for disturbing... It get pictures on feed randomly,, I want it to get only recently uploaded picture,,, keep Scraping until it finds a new one,,, On Mar 3, 2017 7:37 PM, "Mateusz Pawlak" [email protected] wrote:

try it out, should be working Instagram changed their json response with feed media. πŸ‘

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/mpawlak2/instalike-instagram-bot/issues/21#issuecomment-284034289 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AUPGkvk5xaaJWCmVULsMEmVAEEsUPCEaks5riF3WgaJpZM4MP2oV

.

β€” You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/mpawlak2/instalike-instagram-bot/issues/21#issuecomment-285091611, or mute the thread https://github.com/notifications/unsubscribe-auth/AR1lf18VRzHhnGRfn5BovANXQzZZ_VYhks5rjtf-gaJpZM4MP2oV .

-- 010100000110111101111010011001000111001001100001011101110110100101100001011011010010110000001101000010100100110101100001011101000110010101110101011100110111101000100000010100000110000101110111011011000110000101101011

mpawlak2 avatar Mar 08 '17 17:03 mpawlak2

Alright then On Mar 8, 2017 6:45 PM, "Mateusz Pawlak" [email protected] wrote:

Well it works that way if i remember correctly so it is not about fixing but rather scripting new functionality.

W dniu Ε›r., 8.03.2017 o 17:32 virginsince1997 [email protected] napisaΕ‚(a):

How can I fix this please :( On Mar 8, 2017 5:22 PM, "Abiodun Oyetomi" [email protected] wrote:

Yes works fine,,, Sorry for disturbing... It get pictures on feed randomly,, I want it to get only recently uploaded picture,,, keep Scraping until it finds a new one,,, On Mar 3, 2017 7:37 PM, "Mateusz Pawlak" [email protected] wrote:

try it out, should be working Instagram changed their json response with feed media. πŸ‘

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/mpawlak2/instalike-instagram-bot/ issues/21#issuecomment-284034289 , or mute the thread < https://github.com/notifications/unsubscribe-auth/ AUPGkvk5xaaJWCmVULsMEmVAEEsUPCEaks5riF3WgaJpZM4MP2oV

.

β€” You are receiving this because you commented.

Reply to this email directly, view it on GitHub <https://github.com/mpawlak2/instalike-instagram-bot/ issues/21#issuecomment-285091611>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ AR1lf18VRzHhnGRfn5BovANXQzZZ_VYhks5rjtf-gaJpZM4MP2oV> .

-- 010100000110111101111010011001000111001001100001011101110110 100101100001011011010010110000001101000010100100110101100001 011101000110010101110101011100110111101000100000010100000110 000101110111011011000110000101101011

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mpawlak2/instalike-instagram-bot/issues/21#issuecomment-285113558, or mute the thread https://github.com/notifications/unsubscribe-auth/AUPGkqqcDj0zQF1EqsVzMdM5EtTcwiSqks5rjulNgaJpZM4MP2oV .

Oyetomi avatar Mar 09 '17 00:03 Oyetomi

Could you please add it? On Mar 9, 2017 1:34 AM, "Abiodun Oyetomi" [email protected] wrote:

Alright then On Mar 8, 2017 6:45 PM, "Mateusz Pawlak" [email protected] wrote:

Well it works that way if i remember correctly so it is not about fixing but rather scripting new functionality.

W dniu Ε›r., 8.03.2017 o 17:32 virginsince1997 [email protected] napisaΕ‚(a):

How can I fix this please :( On Mar 8, 2017 5:22 PM, "Abiodun Oyetomi" [email protected] wrote:

Yes works fine,,, Sorry for disturbing... It get pictures on feed randomly,, I want it to get only recently uploaded picture,,, keep Scraping until it finds a new one,,, On Mar 3, 2017 7:37 PM, "Mateusz Pawlak" [email protected] wrote:

try it out, should be working Instagram changed their json response with feed media. πŸ‘

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/mpawlak2/instalike-instagram-bot/issues/ 21#issuecomment-284034289 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AUPGkvk5xa aJWCmVULsMEmVAEEsUPCEaks5riF3WgaJpZM4MP2oV

.

β€” You are receiving this because you commented.

Reply to this email directly, view it on GitHub <https://github.com/mpawlak2/instalike-instagram-bot/issues/ 21#issuecomment-285091611>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AR1lf18VR zHhnGRfn5BovANXQzZZ_VYhks5rjtf-gaJpZM4MP2oV> .

-- 010100000110111101111010011001000111001001100001011101110110 100101100001011011010010110000001101000010100100110101100001 011101000110010101110101011100110111101000100000010100000110 000101110111011011000110000101101011

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mpawlak2/instalike-instagram-bot/issues/21#issuecomment-285113558, or mute the thread https://github.com/notifications/unsubscribe-auth/AUPGkqqcDj0zQF1EqsVzMdM5EtTcwiSqks5rjulNgaJpZM4MP2oV .

Oyetomi avatar Mar 09 '17 02:03 Oyetomi

How would that work? Like every picture from your feed?

mpawlak2 avatar Mar 09 '17 07:03 mpawlak2

The script likes randomly,,,, likes pictures from my feed that are hours old,,, want it to get only recently uploaded picture,,, rather than random Pictures,,, that way it likes from bottom to top On Mar 9, 2017 8:42 AM, "Mateusz Pawlak" [email protected] wrote:

How would that work? Like every picture from your feed?

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mpawlak2/instalike-instagram-bot/issues/21#issuecomment-285278225, or mute the thread https://github.com/notifications/unsubscribe-auth/AUPGknyK-1n_AEwi8fCG2n5Y9w7rDq_rks5rj617gaJpZM4MP2oV .

Oyetomi avatar Mar 09 '17 10:03 Oyetomi

hmm i see what you mean. Would that be good: every time bot is about to like picture (say every 30-40s depends on settings) it then downloads ONE most recent picture and likes it, what do you think?

Whereas now it persists e.g. 5 most recent pictures and then like every picture with these time delays thats why it may seem like bot likes old posts.

mpawlak2 avatar Mar 09 '17 10:03 mpawlak2

"Would that be good: every time bot is about to like picture (say every 30-40s depends on settings) it then downloads ONE most recent picture and likes it, what do you think?"

Yes exactly what I meant,,,, SCRAPE FEED - --> GET RECENT PICTURES ON FEED

hmm i see what you mean. Would that be good: every time bot is about to like picture (say every 30-40s depends on settings) it then downloads ONE most recent picture and likes it, what do you think?

Whereas now it persists i.e. 5 most recent pictures and then like every picture with these time delays thats why it may seem like bot likes old posts.

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mpawlak2/instalike-instagram-bot/issues/21#issuecomment-285313650, or mute the thread https://github.com/notifications/unsubscribe-auth/AUPGku-ndLzeEUyXuHaKnzHpq7S9KxNQks5rj9OFgaJpZM4MP2oV .

Oyetomi avatar Mar 09 '17 12:03 Oyetomi

But if there's no new picture on feed,,,, It should keep Scraping until it finds one... But the delay should help keep that in check On Mar 9, 2017 1:02 PM, "Abiodun Oyetomi" [email protected] wrote:

"Would that be good: every time bot is about to like picture (say every 30-40s depends on settings) it then downloads ONE most recent picture and likes it, what do you think?"

Yes exactly what I meant,,,, SCRAPE FEED - --> GET RECENT PICTURES ON FEED

hmm i see what you mean. Would that be good: every time bot is about to like picture (say every 30-40s depends on settings) it then downloads ONE most recent picture and likes it, what do you think?

Whereas now it persists i.e. 5 most recent pictures and then like every picture with these time delays thats why it may seem like bot likes old posts.

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mpawlak2/instalike-instagram-bot/issues/21#issuecomment-285313650, or mute the thread https://github.com/notifications/unsubscribe-auth/AUPGku-ndLzeEUyXuHaKnzHpq7S9KxNQks5rj9OFgaJpZM4MP2oV .

Oyetomi avatar Mar 09 '17 12:03 Oyetomi