我有一个文章列表,其中不包含生产者的URL(这些文章都来自一个生产者)。我想在每篇文章中添加文章的网址。
现在我只有这个:
import csv
included_cols = [1]
content = list()
with open("preisliste.csv", "rb") as csvfile:
reader = csv.reader(csvfile, delimiter=";", quotechar="|")
for row in reader:
content.append(list(row[i] for i in included_cols))
print(content)
输出如下:
[['Artikelbezeichnung'], ['VM-2N'], ['VM-8H'], ['VM-16H'], ['VM-24HC'], ['VM-4HC'], ['VM-400HDCP'], ['VM-4HN'], ['VM-3HN'], ['VM-214DT/220V'], ['VM-212DT/220V'], ['VM-8HN'],...]
现在我想在Google中搜索每个字符串(例如" VM-2N")并保存新列中匹配的URL。
这样的事情可能吗?