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.69k stars 2.71k forks source link

Header images (background_image) are not returned from a user lookup. #645

Closed dotgodly closed 4 years ago

dotgodly commented 4 years ago

Command Ran

import twint

c = twint.Config()
c.Username = "jack"

twint.run.Lookup(c)

Description of Issue

Header images are no longer returned. It seems like there is a place to obtain them in the code, however it is likely Twitter has changed it's CSS.

Environment Details

Linux, Python3

pielco11 commented 4 years ago

Hmm strange

Here's what I get with my handle

immagine

pielco11 commented 4 years ago

And the same with Jack immagine

dotgodly commented 4 years ago

Actually, running the command and obtaining the header from the CSV also works for me, however when using Twint as a module only returns the profile picture.

pielco11 commented 4 years ago

The results are the same since the request is the same and handled in the same way

immagine

Travis-CI is currently pushing to PyPI a little update. You might want to try something like this soon

import twint

c = twint.Config()
c.Username = "jack"
c.Format = "{username} {background_image}"

twint.run.Lookup(c)
pielco11 commented 4 years ago

@dotgodly please upgrade with pip3 install --upgrade twint (or similar) and try the snipped that I previously posted

dotgodly commented 4 years ago

That worked for me, thank you!