I have looked everywhere to find a solution(Including old stackoverflow posts of related issues) to remove javascript not available as output, it gives this for dynamic sites so I decided to use selenium instead of requests library and I still get the same issue. Anybody know how to fix this issue so its possible to scrape dynamic sites. I simply want to retrieve the text from dynamic sites. I've exhausted all ways to find a solution below is my code feel free to add or recommend a solution.
Console output: JavaScript is not available. We’ve detected that JavaScript is disabled in this browser. Please enable JavaScript or switch to a supported browser to continue using twitter.com. You can see a list of supported browsers in our Help Center. Help Center
Below is my code:
import time
from selenium import webdriver
from bs4 import BeautifulSoup
browser = webdriver.Chrome('chromedriver')
options = webdriver.ChromeOptions()
options.headless = True
options.add_argument('--enable-javascript')
options.add_argument("--headless")
browser.get("https:/www.twitter.com/")
time.sleep(2)
html = browser.page_source
soup = BeautifulSoup(html, 'html.parser')
L = soup.getText()
time.sleep(2)
print(L)