I'm trying to find some elements on https://instagram.com using Selenium and my code works on my computer, but when I run it on PythonAnywhere and try to find at least body it returns " ". Code:
from selenium import webdriver
def code():
browser = webdriver.Firefox()
browser.get('https://instagram.com')
print(browser.find_element_by_tag_name('body').text)
def main():
code()
if __name__ == '__main__':
main()
I tried to test it with some random web-sites from their Whitelist and it Worked! But Instagram is also there... So, I am a little bit confused. What's my mistake? Any help is appreciated.
'https://.instagram.com'is a bit weird -- shouldn't it be'https://instagram.com'without the extra dot?BODY?