Open sampleharvgithub opened 1 year ago
Yes I had checked it..and the database is displayed. The port used is 5432 because docker-compose is outside.
On Wed, 26 Apr, 2023, 08:03 Anoosh Dsouza, @.***> wrote:
@.**** commented on this pull request.
In homework/web_scraping_sample.py https://github.com/UniCourt/DataEngineering-Workshop1/pull/32#discussion_r1177273991 :
+import psycopg2 + + +#make a request to the website +url='https://blog.python.org/' +response=requests.get(url) + +#parse the html content using BeautifulSoup +soup=BeautifulSoup(response.content,'html.parser') + +#find all article titles and links +titles=soup.findall('h3',class='blog-title') +dates=soup.findall('h2',class='date-header')
+#connect to the PostgreSQL database +conn=psycopg2.connect(database="mydatabase",user="postgres",password="123456",host="localhost",port="5432")
@sampleharvgithub https://github.com/sampleharvgithub Have you tested this script from your end? If yes, did you verify that the data is getting saved in postgresql database that you've used?
— Reply to this email directly, view it on GitHub https://github.com/UniCourt/DataEngineering-Workshop1/pull/32#pullrequestreview-1401063165, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2DR5TH2TV6RFCOADKB6HFLXDCCRJANCNFSM6AAAAAAXILKK7Y . You are receiving this because you were mentioned.Message ID: @.***>
No, there's no specific reason as such. It's just a random name given to the database.
On Sun, 23 Apr, 2023, 19:27 Anoosh Dsouza, @.***> wrote: