JustAnotherArchivist / JustAnotherArchivist/snscrape

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

Open
#1,044 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
5.4k
Forks
783
PR merge metrics
No merged PRs in 30d

Description

### 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

```python3
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](https://github.com/JustAnotherArchivist/snscrape/assets/79356655/a6b447b9-f014-4352-9eb9-f424b4636fda)

### 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_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.