I am attempting to open the same desired webpage a selected amount of times (by the user) but I can't seem to get it to work.
#Imports modules
import requests
import time
#Assigning variables to strings
import urllib.request
url = "https://r6tab.com/bd6a3f35-5060-499a-8645-369664aae1d9"
# Open the URL as Browser, not as python urllib
how = input("Enter how many views you want!")
for counter in range (0,how):
page=urllib.request.Request(url,headers={'User-Agent': 'Mozilla/5.0'})
infile=urllib.request.urlopen(page).read()
Traceback (most recent call last):
File "C:/Users/lauchlan/Desktop/sss.py", line 14, in <module>
for counter in range (0,how):
TypeError: 'str' object cannot be interpreted as an integer
>>>
Fixed error but views on the webpage arent counting