Giter VIP home page Giter VIP logo

Comments (14)

726232111 avatar 726232111 commented on June 9, 2024 2
  1. install twint (need install git) , dont't use pip install twint command.
    pip3 install --user --upgrade git+https://github.com/twintproject/twint.git@origin/master#egg=twint

  2. get file path
    python.exe -c "import twint;print(twint.__file__);"

  3. replace token.py file
    https://gist.github.com/moxak/ed83dd4169112a0b1669500fe855101a

from twint.

726232111 avatar 726232111 commented on June 9, 2024

#1061 (comment)

After replacing the token.py file, twint can work normally

from twint.

adrianfant avatar adrianfant commented on June 9, 2024

I have the same issue:

RefreshTokenException: Could not find the Guest token in HTML

from twint.

adrianfant avatar adrianfant commented on June 9, 2024

Has the issue been resolved?

from twint.

peterdh avatar peterdh commented on June 9, 2024

also have this error: twint.token.RefreshTokenException: Could not find the Guest token in HTML

from twint.

peterdh avatar peterdh commented on June 9, 2024

replacing token.py with what? thanks

from twint.

peterdh avatar peterdh commented on June 9, 2024

wow ok many thanks. sorry tired & missed your link to the comment there.

from twint.

maharani032 avatar maharani032 commented on June 9, 2024

does it work? because from 28 feb 2023 it always return Raising Exception Could not find the Guest token in HTML

from twint.

peterdh avatar peterdh commented on June 9, 2024

it appears to be working, yes. had to change token.py file.

from twint.

maharani032 avatar maharani032 commented on June 9, 2024

I still having error

      RefreshTokenException                     Traceback (most recent call last)
      ~\AppData\Local\Temp\ipykernel_8280\828474447.py in <module>
            4 c.Pandas=True
            5 c.Lang = "id"
      ----> 6 twint.run.Search(c)
      
      ~\AppData\Roaming\Python\Python39\site-packages\twint\run.py in Search(config, callback)
          408     config.Followers = False
          409     config.Profile = False
      --> 410     run(config, callback)
          411     if config.Pandas_au:
          412         storage.panda._autoget("tweet")
      
      ~\AppData\Roaming\Python\Python39\site-packages\twint\run.py in run(config, callback)
          327         raise
          328 
      --> 329     get_event_loop().run_until_complete(Twint(config).main(callback))
          330 
          331 
      
      ~\AppData\Roaming\Python\Python39\site-packages\twint\run.py in __init__(self, config)
           34         # USAGE : to get a new guest token simply do `self.token.refresh()`
           35         self.token = token.Token(config)
      ---> 36         self.token.refresh()
           37         self.conn = db.Conn(config.Database)
           38         self.d = datelock.Set(self.config.Until, self.config.Since)
      
      ~\AppData\Roaming\Python\Python39\site-packages\twint\token.py in refresh(self)
           67         else:
           68             self.config.Guest_token = None
      ---> 69             raise RefreshTokenException('Could not find the Guest token in HTML')
      
      RefreshTokenException: Could not find the Guest token in HTML

from twint.

lolujubril avatar lolujubril commented on June 9, 2024

I am having the same issue and I have tried replacing token.py

from twint.

726232111 avatar 726232111 commented on June 9, 2024

I use python3.8.8, I don't know if it will help you

from twint.

peterdh avatar peterdh commented on June 9, 2024

I still having error

      RefreshTokenException                     Traceback (most recent call last)
      ~\AppData\Local\Temp\ipykernel_8280\828474447.py in <module>
            4 c.Pandas=True
            5 c.Lang = "id"
      ----> 6 twint.run.Search(c)
      
      ~\AppData\Roaming\Python\Python39\site-packages\twint\run.py in Search(config, callback)
          408     config.Followers = False
          409     config.Profile = False
      --> 410     run(config, callback)
          411     if config.Pandas_au:
          412         storage.panda._autoget("tweet")
      
      ~\AppData\Roaming\Python\Python39\site-packages\twint\run.py in run(config, callback)
          327         raise
          328 
      --> 329     get_event_loop().run_until_complete(Twint(config).main(callback))
          330 
          331 
      
      ~\AppData\Roaming\Python\Python39\site-packages\twint\run.py in __init__(self, config)
           34         # USAGE : to get a new guest token simply do `self.token.refresh()`
           35         self.token = token.Token(config)
      ---> 36         self.token.refresh()
           37         self.conn = db.Conn(config.Database)
           38         self.d = datelock.Set(self.config.Until, self.config.Since)
      
      ~\AppData\Roaming\Python\Python39\site-packages\twint\token.py in refresh(self)
           67         else:
           68             self.config.Guest_token = None
      ---> 69             raise RefreshTokenException('Could not find the Guest token in HTML')
      
      RefreshTokenException: Could not find the Guest token in HTML

what does your environment setup look like? When I was working with this issue in development I changed the token.py file that was in /venv folder in my project...had to do something else for production

from twint.

726232111 avatar 726232111 commented on June 9, 2024

I still having error

      RefreshTokenException                     Traceback (most recent call last)
      ~\AppData\Local\Temp\ipykernel_8280\828474447.py in <module>
            4 c.Pandas=True
            5 c.Lang = "id"
      ----> 6 twint.run.Search(c)
      
      ~\AppData\Roaming\Python\Python39\site-packages\twint\run.py in Search(config, callback)
          408     config.Followers = False
          409     config.Profile = False
      --> 410     run(config, callback)
          411     if config.Pandas_au:
          412         storage.panda._autoget("tweet")
      
      ~\AppData\Roaming\Python\Python39\site-packages\twint\run.py in run(config, callback)
          327         raise
          328 
      --> 329     get_event_loop().run_until_complete(Twint(config).main(callback))
          330 
          331 
      
      ~\AppData\Roaming\Python\Python39\site-packages\twint\run.py in __init__(self, config)
           34         # USAGE : to get a new guest token simply do `self.token.refresh()`
           35         self.token = token.Token(config)
      ---> 36         self.token.refresh()
           37         self.conn = db.Conn(config.Database)
           38         self.d = datelock.Set(self.config.Until, self.config.Since)
      
      ~\AppData\Roaming\Python\Python39\site-packages\twint\token.py in refresh(self)
           67         else:
           68             self.config.Guest_token = None
      ---> 69             raise RefreshTokenException('Could not find the Guest token in HTML')
      
      RefreshTokenException: Could not find the Guest token in HTML

what does your environment setup look like? When I was working with this issue in development I changed the token.py file that was in /venv folder in my project...had to do something else for production

Have you tried replacing the files in the '~\AppData\Roaming\Python\Python39\site-packages\twint' directory?

from twint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.