Skip to content

PR#2

Open
GigiHB wants to merge 2 commits into
mainfrom
nueva_branch
Open

PR#2
GigiHB wants to merge 2 commits into
mainfrom
nueva_branch

Conversation

@GigiHB

@GigiHB GigiHB commented Apr 9, 2025

Copy link
Copy Markdown
Contributor

A ver si ahora sí asuuu

Comment thread PR.py
@@ -0,0 +1,30 @@
S C:\Users\gisel\desktop\challenge_1> git add challenge1.py

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

elimine este archivo

Comment thread ch1.py Outdated

#los primeros 10 items

import feedparser

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

los imports siempre van al principio del archivo, nunca al final

Comment thread ch1.py Outdated
print(f"Link: {link}")

#Guardar un archivo JSON
import json

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

los imports siempre van al principio del archivo, nunca al final

Comment thread ch1.py Outdated
Comment on lines +7 to +11
if r.status_code == 200:
xml_content = r.text
print(xml_content)
else:
print("error")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aquí no ocupa imprimir el contenido de la pagina si está checando el status code.

Suggested change
if r.status_code == 200:
xml_content = r.text
print(xml_content)
else:
print("error")
if r.status_code != 200:
print(f"error with status code {r.status_code}")

@tony-gomez

Copy link
Copy Markdown

Muy bien 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants