I want to request a list of urls which have the following formats for example:
http://en.wikipedia.org/wiki/Monty_Python/001/
http://en.wikipedia.org/wiki/Monty_Python/002/
....
These codes 001,... I saved in a csv file.
import csv
import requests
inputfile = open('trycode.csv','r')
for row in inputfile:
url = 'http://en.wikipedia.org/wiki/Monty_Python/'
source = requests.get(url + row/)
And obviously it doesn't work... How can I correctly call these urls with the last part coming from the csv file?
Many thanks!
url + row + '/'? Or'%s%s/' % (url, row)?