From c0891aa5e130e504f1fd707a8de5ca127eab5315 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 9 Aug 2018 19:20:18 -0400 Subject: [PATCH] Removed external links --- od_db_client.py | 4 +--- run.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/od_db_client.py b/od_db_client.py index 13ebdb1..cdf6e75 100644 --- a/od_db_client.py +++ b/od_db_client.py @@ -113,10 +113,8 @@ class OdDatabase: hl_path = truncate_path(hl_path, 65) hl_path += "/" if hl_path else "" - file_link = src["website_url"] + src["path"] + "/" + src["name"] + ("." if src["ext"] else "") + src["ext"] - message += "[" + src["website_url"] + "](https://od-db.the-eye.eu/website/" + str(src["website_id"]) + "/)" + hl_path - message += hl_name + ("." if src["ext"] else "") + src["ext"] + " [[DL]](" + file_link + ") | " + message += hl_name + ("." if src["ext"] else "") + src["ext"] + " | " message += humanfriendly.format_size(src["size"]) + " | " message += time.strftime("%Y-%m-%d", time.gmtime(src["mtime"])) + " \n" diff --git a/run.py b/run.py index 1abe52c..dfedeb9 100644 --- a/run.py +++ b/run.py @@ -152,7 +152,7 @@ def process_post(submission): if __name__ == "__main__": reddit = praw.Reddit('opendirectories-bot', - user_agent='github.com/simon987/opendirectories-bot-new (by /u/Hexahedr_n)') + user_agent='github.com/simon987/opendirectories-bot-2 (by /u/Hexahedr_n)') bot = RedditBot("processed.txt", reddit) subreddit = reddit.subreddit("test")