JustAnotherArchivist / snscrape

A social networking service scraper in Python
GNU General Public License v3.0
4.33k stars 699 forks source link

How can I get video or photo of media ? #173

Closed HAKANMAZI closed 3 years ago

HAKANMAZI commented 3 years ago

I am using this code to get media of tweet.

import snscrape
for tweet in snscrape.modules.twitter.TwitterUserScraper(username=name).get_items():
        media=tweet.media
        print(media)

I am getting this error

Traceback (most recent call last): File "1.py", line 37, in media=tweet.media AttributeError: 'Tweet' object has no attribute 'media'

JustAnotherArchivist commented 3 years ago

The media attribute is only available in the current development version, so you'll need to install from this repository rather than from PyPI.

HAKANMAZI commented 3 years ago

Thank very fastly answer bro ; Then ı installed pip3 install git+https://github.com/JustAnotherArchivist/snscrape.git this version problem is solved.