You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i have no idea what's wrong here but maybe is something related to the images fetching, but the post's fetching works fine for one post only and after it, it shows (Error fetching discover feed: 'orig')
if 'embed' in post and 'images' in post['embed']:
for image in post['embed']['images']:
if 'original' in image:
image['orig'] = image.pop('original')
# Extract image links
if 'embed' in post and 'images' in post['embed']:
for image in post['embed']['images']:
media_links.append(image['orig']['fullSize'])
# Extract video links
if 'embed' in post and 'external' in post['embed']:
media_links.append(post['embed']['external']['uri'])
return media_links
# Construct the URL for the user's profile feed
profile_feed_url = f"https://api.bsky.app/xrpc/app.bsky.feed.getAuthorFeed?actor={handle}"
cursor = None
while True:
if cursor:
profile_feed_url = f"https://api.bsky.app/xrpc/app.bsky.feed.getAuthorFeed?actor={handle}&cursor={cursor}"
response = requests.get(profile_feed_url)
profile_feed = response.json()
posts = []
for feed_view in profile_feed.get('feed', []):
post = feed_view.get('post', {}).get('record', {})
author = feed_view.get('post', {}).get('author', {})
uri = feed_view.get('post', {}).get('uri', '')
# Skip if the post already exists in the database
if post_exists(uri):
print(f"Post already seen: {uri}")
continue
print(f'{author.get("displayName", "")}: {post.get("text", "")}')
media_links = extract_media_links(post)
if media_links:
print("Media Links:")
for link in media_links:
print(f" - {link}")
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
i have no idea what's wrong here but maybe is something related to the images fetching, but the post's fetching works fine for one post only and after it, it shows (Error fetching discover feed: 'orig')
Beta Was this translation helpful? Give feedback.
All reactions