-
-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #172 from bjsi/add-bookmarks-support
feat: add support for getting bookmarks
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import asyncio | ||
|
||
import twscrape | ||
from twscrape.utils import gather | ||
|
||
async def main(): | ||
api = twscrape.API() | ||
# add accounts here or before from cli (see README.md for examples) | ||
await api.pool.add_account("BookmarkTe60140", "", '', '') | ||
await api.pool.login_all() | ||
bms = await gather(api.bookmarks()) | ||
for bm in bms: | ||
print(bm.rawContent) | ||
print('-----') | ||
|
||
if __name__ == "__main__": | ||
asyncio.run(main()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters