I've got a list if 10,000 URLs that I need to check and I'm automatizing the process of opening those URLs.
So far, I've done this and it works:
import webbrowser
import pandas as pd
urls = pd.read_csv('urls.csv', delimiter='\'')
urls = urls['urls']
for url in urls[:100]:
webbrowser.open_new(url)
Now, the problem is that with this I have to go to the code and change the slicing every time I need new URLs to be open. Do you think is possible to ask for an input to the users in order to select by themselves the range of slicing?
I've tried this:
for url in urls[{''}:{''}].format(input('Enter first line: '), input('Enter last line: ')):
webbrowser.open_new(url)
And I get this error:
TypeError: cannot do slice indexing on <class 'pandas.core.indexes.range.RangeIndex'> with
these indexers [{''}] of <class 'set'>
Thoughts?