Question: Can someone help me debug my python code in the main function. There are red underlines that need to be fixed. aggregator.py x 21 def

Can someone help me debug my python code in the main function. There are red underlines that need to be fixed.

 Can someone help me debug my python code in the main

aggregator.py x 21 def main): 23 24 25 26 27 28 29 30 31 32 # read command line, filename, topic filename sys.argvl-1] # read file, line by line with open (filename) as f: content f.readlines() for line in lines: # for each line, pull contents from web using urllib if len(sys.argv)-3: print("Error: Invalid arguments") print("Usage:aggregator.py filename topic") file open (sys.argv [1] ,''r") out sys.argv [2] +"sources.txt" file1 open (out,"w") for line in file: 34 35 36 37 38 39 40 41 42 43 try: response = urllib.urlopen (line) content response.read() count0 for linel in content: ust-line1. split (">") List = list [1] . split("

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!