Я не знаю, почему код выдает ошибку
File "<ipython-input-68-1efe37b7d511>", line 1, in <module>
sourceData = urllib.request.urlopen(url_list[0])
File "C:\Users\Sajid Hasan Sifat\Anaconda3\lib\urllib\request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "C:\Users\Sajid Hasan Sifat\Anaconda3\lib\urllib\request.py", line 516, in open
req.timeout = timeout
AttributeError: 'list' object has no attribute 'timeout'
Мой код
import bs4 as bs
import urllib.request
import urllib.parse
import re
import nltk
import pandas as pd
from pandas import DataFrame
nltk.download('stopwords')
import heapq
listofurls = pd.read_csv("C:/Users/Sajid Hasan Sifat/Desktop/global one/GO-url.csv")
urls = DataFrame(listofurls, columns = ['urls'])
url_list = urls.values.tolist()
print(url_list[0])
req = urllib.request.Request(url_list[0])
print(req)
sourceData = urllib.request.urlopen(url_list[0])
source = sourceData.read()
soup = bs.BeautifulSoup(source)