mirror of
https://github.com/simon987/opendirectories-bot-2.git
synced 2025-04-20 10:36:42 +00:00
Removed external links
This commit is contained in:
parent
14bcfb75f2
commit
c0891aa5e1
@ -113,10 +113,8 @@ class OdDatabase:
|
|||||||
hl_path = truncate_path(hl_path, 65)
|
hl_path = truncate_path(hl_path, 65)
|
||||||
hl_path += "/" if hl_path else ""
|
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 += "[" + 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 += humanfriendly.format_size(src["size"]) + " | "
|
||||||
message += time.strftime("%Y-%m-%d", time.gmtime(src["mtime"])) + " \n"
|
message += time.strftime("%Y-%m-%d", time.gmtime(src["mtime"])) + " \n"
|
||||||
|
|
||||||
|
2
run.py
2
run.py
@ -152,7 +152,7 @@ def process_post(submission):
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
reddit = praw.Reddit('opendirectories-bot',
|
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)
|
bot = RedditBot("processed.txt", reddit)
|
||||||
subreddit = reddit.subreddit("test")
|
subreddit = reddit.subreddit("test")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user