Skip to content

Commit

Permalink
Removal of leading and trailing characters from the thread argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Exceen committed Sep 17, 2018
1 parent e17e063 commit a3311b8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions inb4404.py
Expand Up @@ -25,10 +25,11 @@ def main():
else:
logging.basicConfig(level=logging.INFO, format='[%(asctime)s] %(message)s', datefmt='%I:%M:%S %p')

if args.thread[0][:4].lower() == 'http':
download_thread(args.thread[0])
thread = args.thread[0].strip()
if thread[:4].lower() == 'http':
download_thread(thread)
else:
download_from_file(args.thread[0])
download_from_file(thread)

def load(url):
req = urllib.request.Request(url, headers={'User-Agent': '4chan Browser'})
Expand Down

0 comments on commit a3311b8

Please sign in to comment.