Sidebar

Pythörhead

pythorhead
Pythörhead sloonark 1 year ago 100%
With pythorhead, can I post to a community in a different instance?

If I use pythorhead to log in to one lemmy instance, can I still post to a community on a different instance? I tried using discover_community to search for the community (with @community@instance) but that didn't work. Is this possible, or can I only post to communities on the instance I am logged in on via the script?

1
1
pythorhead
Pythörhead HorseFD 1 year ago 100%
Help listing only subscribed communities

Hi, I'm looking for a bit of help getting a list of communities the authenticated user is subscribed to. I'm getting the list like this: `communities = lemmy.community.list(type_=ListingType.Subscribed)` However despite specifying the _type as ListingType.Subscribed, I'm still getting back a list that includes items with the value: `'subscribed': 'NotSubscribed'` It's very possible that I'm interpreting how this works wrong, so if someone has any tips for doing this I'd be very appreciate. Thanks!

2
0
pythorhead
Pythörhead Football_Vid_Bot 1 year ago 100%
Python Beginner Seeking Help...

Hi, Not sure if its ok to ask questions in here...? I'm very much a beginner at python but I've managed to get my python script set up to post to a community. The only issue is that I can only post to communities on my own instance. I feel like I'm missing something obvious related to community_id or community_name. ``` from pythorhead import Lemmy lemmy = Lemmy('https://lemmy.fmhy.ml') lemmy.log_in('username', 'password') community_id = lemmy.discover_community('test_video_bot') lemmy.post.create(community_id, url='https://www.youtube.com/watch?v=riuGVkq2DKw', name='Football Highlights') ``` Above is my current code which works but if I remove the 'test_video_bot' community on my instance and replace it with 'lemmy.world/c/football' or 'lemmy.fmhy.ml/c/football@lemmy.world' I get two errors: ``` Error encountered while Request.GET: {"error":"couldnt_find_community"} Error encountered while Request.POST: Json deserialize error: invalid type: null, expected i32 at line 1 column 21 ``` It's as if it's only searching my own instance and I'm not sure how to tell it to look elsewhere or if it's not possible yet to do this on pythorhead. Thanks for any suggestions you can give to help with this issue.

2
2
pythorhead
Pythörhead db0 1 year ago 100%
Pythörhead releases now use Pythörhead to post announcements in /c/pythorhead github.com

The CI/CD pipeline for [Pythorhead](https://github.com/db0/pythorhead) has been adjusted make a post in !pythorhead@lemmy.dbzer0.com whenever a new release is published.

2
0
pythorhead
Pythörhead db0 1 year ago 100%
So many uses already!
2
0