This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests # pip install requests | |
import bs4 # pip install beautifulsoup4 | |
from pathlib import Path # part of the python 3.6+ standard library | |
in_file = Path(__file__).parent / input("Relative path to file: ") | |
comments = [] | |
def is_url(word): | |
if ("http" in word or "www" in word): # most URLS have at least one of the two | |
return True | |
with open(in_file) as fp: |