I have a dataframe containing leads (names). I am trying to search the web for relevant data regarding those leads.
I am using beautifulsoup and urllib to scrape the data. The url looks like this :
url = u'https://www.website.com/SearchResults?query=' + quote(str(df['name']))
The problem is that for each lead i get the exact same data, which is the data for the last lead in the dataframe of which data was retrieved.
whenever i use a string name instead of str(df['name']), i get for the specific lead the right data, and it looks like this :
url = u'https://www.website.com/SearchResults?query=' + quote('this+is+a+leads+name')
The reason i think the problem is specifically related to str(df['name']) is because whenever i remove it, i successfuly aquire data, otherwise, i get for 100,000 leads the same data. Only problem is, in order to use the leads from the dataframe i need to use str.