OSINT Flashcards

1
Q

What are useful libraries to download a website?

A

URLLIB, URLLIB2 and REQUESTS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to download a website with urllib?

A

import urllib

webpage = "http://www.ucd.ie/cci/people.html"
connection = urllib.urlopen(webpage)
contents = connection.read()

print(contents)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How to download a website with requests?

A

import requests

webpage = "http://www.ucd.ie/cci/people.html"
contents = requests.get(webpage)

print(contents.text)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly