title: How do I search the company's tickers that are mentioned from reddit wallstreetbets platform?
body: <p>I want to use the code below, but right now for searching the company's ticker name, I could only search it by searching the symbol&quot;$&quot;. Is there any way I can search the name without the &quot;$&quot;? The full python code is shown below:</p>
  <pre><code>from psaw import PushshiftAPI 
  import config
  import datetime 
  import psycopg2
  import psycopg2.extras
  
  connection = psycopg2.connect(host=config.DB_HOST, database=config.DB_NAME, user=config.DB_USER, password=config.DB_PASS)
  
  cursor = connection.cursor(cursor_factory=psycopg2.extras.DictCursor)
  cursor.execute(&quot;&quot;&quot;
      SELECT * FROM stock
  &quot;&quot;&quot;)
  rows = cursor.fetchall()
  
  stocks = {}
  for row in rows:
      stocks['$' + row['symbol']] = row ['id']
  
  api = PushshiftAPI()
  
  start_time  = int(datetime.datetime(2022, 8, 19).timestamp())
  
  submissions = api.search_submissions(after=start_time,
                              subreddit='wallstreetbets',
                              filter=['url','author', 'title', 'subreddit'],)
  
  for submission in submissions:
      words = submission.title.split()
      cashtags = list(set(filter(lambda word: word.lower().startswith('$'), words)))
  
      if len(cashtags) &gt; 0:
          #print(cashtags)
          #print(submission.created_utc)
          #print()
          #print(submission.url)
  
          for cashtag in cashtags:
              submitted_time = datetime.datetime.fromtimestamp(submission.created_utc).isoformat()
  
              try:
                  cursor.execute(&quot;&quot;&quot;
                      INSERT INTO mention (dt, stock_id,message,source,url)
                      VALUES (%s, %s. %s, 'wallstreetbets', %s)
                  &quot;&quot;&quot;, (submitted_time, stocks[cashtag], submission.title, submission.url))
              
                  connection.commit()
              except Exception as e:
                  print(e)
                  connection.rollback()
  </code></pre>