yihong0618 / twint

An advanced Twitter scraping & OSINT tool written in Python that doesn't use Twitter's API, allowing you to scrape a user's followers, following, Tweets and more while evading most API limitations.
MIT License
324 stars 82 forks source link

Having problem with c.Search command #12

Open AhsanMollani opened 1 year ago

AhsanMollani commented 1 year ago

import twint import nest_asyncio c = twint.Config() nest_asyncio.apply() c.Search = "dementia" c.Since = '2015-01-17 00:00:00' c.Until = '2025-03-17 00:00:00' c.Limit = 1 c.Pandas = True c.Store_json = True c.Output = 'ahsan.json' twint.run.Search(c)

Hi, I am trying to run the c.Search i am getting the error below :

Whenever I am using c.Username instead of c.Search, the code works fine.


  File "C:\Users\Ahsan Mollani\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\yarl\_url.py", line 982, in <genexpr>
    quoter(k) + "=" + quoter(self._query_var(v)) for k, v in query
                             ^^^^^^^^^^^^^^^^^^
  File "C:\Users\Ahsan Mollani\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\yarl\_url.py", line 946, in _query_var
    raise TypeError(
TypeError: Invalid variable type: value should be str, int or float, got None of type <class 'NoneType'>

If someone can help me out thanks

yihong0618 commented 1 year ago

twitter ban search api

AhsanMollani commented 1 year ago

Ohh, thank you for this information. Is there any possibility we can get the data through keywords. I am stuck with my research work because of this :(