Code Monkey home page Code Monkey logo

Comments (10)

shaikhsajid1111 avatar shaikhsajid1111 commented on September 1, 2024

I don't think this issue is related to the library but is probably due to some external factor. I am unable to recreate this issue. What is your environment? I found related issues here

Just side note: I would suggest using scrape_topic_with_api() for faster speed and accurate data in case you're scraping topics

from twitter-scraper-selenium.

Dragonizedpizza avatar Dragonizedpizza commented on September 1, 2024

I tried scrape_topic_with_api, I got this -

2022-10-29 09:23:32,697 - twitter_scraper_selenium.element_finder - ERROR - Failed to find key!
NoneType: None
2022-10-29 09:23:32,794 - twitter_scraper_selenium.element_finder - WARNING - Error at find_graphql_link : 'NoneType' object has no attribute 'split'
2022-10-29 09:27:50,535 - WARNING - Failed to make request!
Traceback (most recent call last):
  File "/root/Bots/DiscordBots/TwitterTopics/MTC/src/util/scrape.py", line 6, in <module>
    scrape_topic_with_api(URL='https://twitter.com/i/topics/1468157909318045697', output_filename='tweets', tweets_count=10)
  File "/usr/local/lib/python3.10/dist-packages/twitter_scraper_selenium/topic_api.py", line 156, in scrape_topic_with_api
    data.update(content)
TypeError: 'NoneType' object is not iterable

from twitter-scraper-selenium.

shaikhsajid1111 avatar shaikhsajid1111 commented on September 1, 2024

The issue is probably that firefox itself is not instantiating on your system. What is your environment?

from twitter-scraper-selenium.

Dragonizedpizza avatar Dragonizedpizza commented on September 1, 2024

The issue is probably that firefox itself is not instantiating on your system. What is your environment?

As in? I'm on Ubuntu 20.04, with Python 3.10

from twitter-scraper-selenium.

shaikhsajid1111 avatar shaikhsajid1111 commented on September 1, 2024

Okay, I don't have much idea about this issue. People all over the internet end up with this for different reasons which can be found here. I've kept a wait before accessing DOM as well. Please consider passing the argument headless=False to scrape_topic(), it'll show you what is happening with your browser

from twitter-scraper-selenium.

Dragonizedpizza avatar Dragonizedpizza commented on September 1, 2024
2022-10-29 12:47:24,770 - WARNING - Error at scrap : Message: Process unexpectedly closed with status 1

Traceback (most recent call last):
  File "/root/Bots/DiscordBots/TwitterTopics/MTC/src/util/scrape.py", line 6, in <module>
    scrape_topic_with_api(URL='https://twitter.com/i/topics/1468157909318045697', output_filename='tweets', tweets_count=10, headless=False)
  File "/usr/local/lib/python3.10/dist-packages/twitter_scraper_selenium/topic_api.py", line 156, in scrape_topic_with_api
    data.update(content)
AttributeError: 'NoneType' object has no attribute 'update'

from twitter-scraper-selenium.

shaikhsajid1111 avatar shaikhsajid1111 commented on September 1, 2024

No, I meant to say you can watch the browser opening by yourself which can let you know what is happening in your system while scraping. You might have seen browser opening automatically all that, that's what I was talking about

from twitter-scraper-selenium.

Dragonizedpizza avatar Dragonizedpizza commented on September 1, 2024

No, I meant to say you can watch the browser opening by yourself which can let you know what is happening in your system while scraping. You might have seen browser opening automatically all that, that's what I was talking about

I tested it, it works on my laptop for some reason, but not the vps

from twitter-scraper-selenium.

shaikhsajid1111 avatar shaikhsajid1111 commented on September 1, 2024

I can't say why it isn't running on VPS πŸ€”

from twitter-scraper-selenium.

Dragonizedpizza avatar Dragonizedpizza commented on September 1, 2024

nvm, turns out a reboot fixed it πŸ˜‚ thank you for the help

from twitter-scraper-selenium.

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.