taspinar / twitterscraper

Scrape Twitter for Tweets
MIT License
2.39k stars 579 forks source link

lxml twitterscraper #249

Open muhjaury opened 4 years ago

muhjaury commented 4 years ago

INFO: {'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 6.1; x64; fr; rv:1.9.2.13) Gecko/20101203 Firebird/3.6.13'} Traceback (most recent call last): File "/home/mist/.local/bin/twitterscraper", line 5, in from twitterscraper.main import main File "/home/mist/.local/lib/python3.7/site-packages/twitterscraper/init.py", line 13, in from twitterscraper.query import query_tweets File "/home/mist/.local/lib/python3.7/site-packages/twitterscraper/query.py", line 73, in proxies = get_proxies() File "/home/mist/.local/lib/python3.7/site-packages/twitterscraper/query.py", line 44, in get_proxies soup = BeautifulSoup(response.text, 'lxml') File "/usr/lib/python3/dist-packages/bs4/init.py", line 156, in init % ",".join(features)) bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?

When I use

pip install lxml

Result is

Requirement already satisfied: lxml in /usr/lib/python3/dist-packages (3.5.0)

Found that problem, what should I do? Thankyou

NicholasDow commented 4 years ago

I am also having this specific issue

lapp0 commented 4 years ago

@NicholasDow you may have multiple conflicting python installations. I recommend

1) trying this fix https://stackoverflow.com/a/52259845

2) trying to create a virtualenv and install twitterscraper in there