Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR SCARPING FEED #21

Open
Oyetomi opened this issue Mar 1, 2017 · 12 comments
Open

ERROR SCARPING FEED #21

Oyetomi opened this issue Mar 1, 2017 · 12 comments

Comments

@Oyetomi
Copy link

Oyetomi commented Mar 1, 2017

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
Copy link
Author

Oyetomi commented Mar 1, 2017

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'

@mpawlak2
Copy link
Owner

mpawlak2 commented Mar 3, 2017

try it out, should be working Instagram changed their json response with feed media.
👍

@Oyetomi
Copy link
Author

Oyetomi commented Mar 8, 2017 via email

@Oyetomi
Copy link
Author

Oyetomi commented Mar 8, 2017 via email

@mpawlak2
Copy link
Owner

mpawlak2 commented Mar 8, 2017 via email

@Oyetomi
Copy link
Author

Oyetomi commented Mar 9, 2017 via email

@Oyetomi
Copy link
Author

Oyetomi commented Mar 9, 2017 via email

@mpawlak2
Copy link
Owner

mpawlak2 commented Mar 9, 2017

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

@Oyetomi
Copy link
Author

Oyetomi commented Mar 9, 2017 via email

@mpawlak2
Copy link
Owner

mpawlak2 commented Mar 9, 2017

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.

@Oyetomi
Copy link
Author

Oyetomi commented Mar 9, 2017 via email

@Oyetomi
Copy link
Author

Oyetomi commented Mar 9, 2017 via email

Repository owner deleted a comment from YeMyoAung Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants