Israel's Profile User Rating: -----

Reputation: 7 Worker
Group:
Authors
Active Posts:
824 (0.2 per day)
Joined:
22-November 04
Profile Views:
12,591
Last Active:
User is offline Mar 12 2016 12:09 AM
Currently:
Offline

Previous Fields

Country:
Who Cares
OS Preference:
Linux
Favorite Browser:
FireFox
Favorite Processor:
Intel
Favorite Gaming Platform:
Playstation
Your Car:
Mitsubishi
Dream Kudos:
200

Latest Visitors

Icon   Israel In /dev/null no one can hear you scream...

Posts I've Made

  1. In Topic: Trouble Passing Command-Line Arguement

    Posted 19 Sep 2015

    Omg... That just made me feel stupid:

    ./scrape.py http://google.com
    http://www.google.com/imghp?hl=en&tab=wi
    http://maps.google.com/maps?hl=en&tab=wl
    https://play.google.com/?hl=en&tab=w8
    http://www.youtube.com/?tab=w1
    http://news.google.com/nwshp?hl=en&tab=wn
    https://mail.google.com/mail/?tab=wm
    https://drive.google.com/?tab=wo
    http://www.google.com/intl/en/options/
    http://www.google.com/history/optout?hl=en
    http://google.com/preferences?hl=en
    https://accounts.google.com/ServiceLogin?hl=en&continue=http://www.google.com/
    http://google.com/chrome/browser/?hl=en&brand=CHNG&utm_source=en-hpp&utm_medium=hpp&utm_campaign=en
    http://google.com/advanced_search?hl=en&authuser=0
    http://google.com/language_tools?hl=en&authuser=0
    http://google.com/intl/en/ads/
    http://google.com/services/
    https://plus.google.com/116899029375914044550
    http://google.com/intl/en/about.html
    http://google.com/intl/en/policies/privacy/
    http://google.com/intl/en/policies/terms/
    
    Nuber of total URLs: 20
    


    Switching from night to day shift does not help my logic capabilities. Thank you for your patience.
  2. In Topic: Trouble Passing Command-Line Arguement

    Posted 19 Sep 2015

    Quote

    argv is a list (what made you think it was a single value?)


    I didn't know it was an actual list, but that makes sense. I changed this line to the following :

    httpResponse = urllib.urlopen(sys.argv[1])
    


    Now I'm suddenly being asked for a file or directory?

    $ ./scrape.py google.com
    Traceback (most recent call last):
      File "./scrape.py", line 18, in <module>
        httpResponse = urllib.urlopen(sys.argv[1])
      File "/usr/lib/python2.7/urllib.py", line 86, in urlopen
        return opener.open(url)
      File "/usr/lib/python2.7/urllib.py", line 207, in open
        return getattr(self, name)(url)
      File "/usr/lib/python2.7/urllib.py", line 462, in open_file
        return self.open_local_file(url)
      File "/usr/lib/python2.7/urllib.py", line 476, in open_local_file
        raise IOError(e.errno, e.strerror, e.filename)
    IOError: [Errno 2] No such file or directory: 'google.com'
    


    I tried str(sys.argv[1]) with the same results. Maybe the library requires a file for this? Or maybe I'm still doing it wrong :P

    Thanks for the suggestion!

My Information

Member Title:
D.I.C Addict
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Location:
Hell
Years Programming:
8
Programming Languages:
C, Python, Perl, Ruby, Bash HTML, CSS, PHP, MySQL

Contact Information

E-mail:
Click here to e-mail me

Comments

Israel has no profile comments yet. Why not say hello?