JustAnotherArchivist / snscrape

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

AttributeError: 'FileFinder' object has no attribute 'find_module' #1038

Closed xts-bit closed 11 months ago

xts-bit commented 11 months ago

Describe the bug

I get this error when i install the package and try to run my code. the error is "AttributeError: 'FileFinder' object has no attribute 'find_module'"

Anyone help please ,


import snscrape.modules.twitter as sntwitter
import pandas as pd

username = "elonmusk"

tweets_list = []

for i, tweet in enumerate(sntwitter.TwitterSearchScraper('from:'+username).get_items()):
    if i >= 100:  
        break
    tweets_list.append([tweet.date, tweet.id, tweet.content, tweet.url])
tweets_df = pd.DataFrame(tweets_list, columns=['Datetime', 'Tweet Id', 'Text', 'URL'])

print(tweets_df)

How to reproduce

python3 index.py

Expected behaviour

It should get all tweets by elon musk

Screenshots and recordings

No response

Operating system

MacOS

Python version: output of python3 --version

Python 3.12.0

snscrape version: output of snscrape --version

I again get this error AttributeError: 'FileFinder' object has no attribute 'find_module'

Scraper

twitter

How are you using snscrape?

Module (import snscrape.modules.something in Python code)

Backtrace

No response

Log output

No response

Dump of locals

No response

Additional context

No response

JustAnotherArchivist commented 11 months ago

Duplicate of #782, but Twitter scraping won't work currently even after that's resolved (#996).

xts-bit commented 11 months ago

@JustAnotherArchivist So when will it fiX?

tangruixun commented 8 months ago

How to fix this????????????