Removed external links

This commit is contained in:
Simon 2018-08-09 19:20:18 -04:00
parent 14bcfb75f2
commit c0891aa5e1
2 changed files with 2 additions and 4 deletions

View File

@ -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"

2
run.py
View File

@ -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")