Apr-13-2017, 05:06 PM
Before the 42nd line, the code seems to be workable. But the pytrends can't work. And I've written the line from 44th to 46rd as
try:
one_stock_data = []
# trend
trend = pytrends.build_payload(kw_list=[stock_name],timeframe='2013-12-29 2016-12-31', geo='TW')
time.sleep(random.randint(120, 360))
But it still can't work.
try:
one_stock_data = []
# trend
trend = pytrends.build_payload(kw_list=[stock_name],timeframe='2013-12-29 2016-12-31', geo='TW')
time.sleep(random.randint(120, 360))
But it still can't work.