Skip to content

Commit

Permalink
fix fetcher
Browse files Browse the repository at this point in the history
  • Loading branch information
esteves-esta committed Dec 16, 2023
1 parent c502ff7 commit 78bae3c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Formatting Humans of Seoul RSS feed to be to practice reading in koreand and be
![Header image ](/header-readme.png "Header")

> ### Access app on the link:
> TODO
> https://esteves-esta.github.io/humans-of-seoul-feed-format/
## Index

Expand Down
6 changes: 4 additions & 2 deletions app/src/components/FeedProvider/fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ export async function fetcher(teste) {
const response = await fetch(FEED_URL, {
method: "GET"
});
const text = await response.text();
const dataXML = new DOMParser().parseFromString(text, "text/xml");
const json = await response.json()
// console.log(json.contents);
// const text = await json.contents.text();
const dataXML = new DOMParser().parseFromString(json.contents, "text/xml");

const itemsHTML = dataXML.querySelectorAll("item");
const posts = parseDOM2JSON(itemsHTML);
Expand Down

0 comments on commit 78bae3c

Please sign in to comment.