JustAnotherArchivist / snscrape

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

OSError: [WinError 87] The parameter is incorrect #190

Closed HAKANMAZI closed 3 years ago

HAKANMAZI commented 3 years ago

I am using snscrape development version Here is the code;

import snscrape.modules.twitter as sntwitter

for i, tweet in enumerate(sntwitter.TwitterSearchScraper('covid19 since:2020-01-01 until:2021-01-01').get_items()):

    print(tweet.user.username)
    print(tweet.content)
    print(tweet.date)
    print('\n')
    if i>5:
        break 

Output error is below:

bee_meliz
Happy New Year 2021 hope the new year will bring us luck love joy money and a cure for everyone that will DESTROY covid19 May God bless you all and the angels guide us   in Jesus precious name we pray Amen also I hope you all having a good time wherever you are �������🙏🍾🍾🍾🍾🍾🍾�Traceback (most recent call last):
  File "c:\Users\hnn\Desktop\hey\twitter\main.py", line 6, in <module>
    print(tweet.content)
OSError: [WinError 87] Parametre hatalı
JustAnotherArchivist commented 3 years ago

Your code works fine here. This sounds like another Windows UTF-8 issue, possibly similar to #122.

HAKANMAZI commented 3 years ago

You are right, I push data to sql server there is no problem thanks