Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module 'snscrape.utils' has no attribute 'TwitterSearch' #1044

Open
elieayoubit opened this issue Apr 1, 2024 · 1 comment
Open

module 'snscrape.utils' has no attribute 'TwitterSearch' #1044

elieayoubit opened this issue Apr 1, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@elieayoubit
Copy link

elieayoubit commented Apr 1, 2024

Describe the bug

  1. Versions : Python 3.10.12, and snscrape 0.7.0.20230622

  2. Imported Library : import snscrape.modules.twitter as sntwitter

  3. Using : tweets = sntwitter.TwitterSearch(query=search_term, max_results=max_results, since=since_date, until=until_date)

  4. Error: module 'snscrape.utils' has no attribute 'TwitterSearch'

  5. I already tried updating snscrape, uninstalling and reinstalling

How to reproduce

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

search_term = "any term"
max_results = 100

# Optional: Filter by date
since_date = "2024-02-01"
until_date = "2024-04-01"

tweets = sntwitter.TwitterSearch(query=search_term, max_results=max_results, since=since_date, until=until_date)

Expected behaviour

import

Screenshots and recordings

image

Operating system

Windows 10 Pro

Python version: output of python3 --version

Python 3.10.12

snscrape version: output of snscrape --version

snscrape 0.7.0.20230622

Scraper

How are you using snscrape?

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

Backtrace

module 'snscrape.utils' has no attribute 'TwitterSearch'

Log output

No response

Dump of locals

No response

Additional context

No response

@elieayoubit elieayoubit added the bug Something isn't working label Apr 1, 2024
@JustAnotherArchivist
Copy link
Owner

TwitterSearch has never existed. TwitterSearchScraper does, but it's broken (see other open issues).

I will leave this issue open though because there is a bug here: the error should refer to snscrape.modules.twitter, not snscrape.utils.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants