#!/usr/bin/python3
from pytrends.request import TrendReq
import pytrends
import sys
import datetime
import traceback
import requests
from bs4 import BeautifulSoup
import re
#import farmlib
import pandas as pd
import random
import os
import dataset

db = dataset.connect('mysql://choozmo:pAssw0rd@db.ptt.cx:3306/yodb?charset=utf8mb4')

cursor=db.query('SELECT distinct ts_word FROM trending_searches ORDER BY ts_date DESC limit 20;')
for c in cursor:
    print(c['ts_word'])

