twintproject / twint

An advanced Twitter scraping & OSINT tool written in Python that doesn't use Twitter's API, allowing you to scrape a user's followers, following, Tweets and more while evading most API limitations.
MIT License
15.68k stars 2.71k forks source link

Wiki Mistakes: attributes for custom formatting #1235

Open batmanscode opened 3 years ago

batmanscode commented 3 years ago

Wiki needs a minor update

Using datestamp from tweet attributes returns and error. It works when using date instead.

Code to test

This works

import twint
import nest_asyncio

nest_asyncio.apply()

c = twint.Config()
c.Search = "bitcoin"
c.Min_likes = 2500
c.Custom["tweet"] = ["date", "tweet"]

twint.run.Search(c)

This doesn't

import twint
import nest_asyncio

nest_asyncio.apply()

c = twint.Config()
c.Search = "bitcoin"
c.Min_likes = 2500
c.Custom["tweet"] = ["datestamp", "tweet"]

twint.run.Search(c)
batmanscode commented 3 years ago

Update

In Wiki What Actually Works Where
datestamp date tweet attributes
timestamp time tweet attributes
avatar profile_image_url user attributes
charliehawco commented 2 years ago

~Hi all, looks like the "created_at" attribute doesn't work either~

Cancel cancel, I didn't realise that the attributes you use in the .Format() sub don't match with the ones you use in the .custom sub