Energy-Price-News-API/energy-prices-api

[BUG] Euronews missing url base

Closed this issue ยท 14 comments

What bug did you encounter?

Going to the single source route for Euronews I noticed that the URLs provided are in need of a base.

What did you expect to happen?

A full URL to be returned so that a user of the API can link directly to the article found.

Screenshots

image

Additional information

Current url example:

"/2022/09/17/this-1373km-long-undersea-cable-will-bring-green-energy-from-egypt-to-europes-electricity-"

Have a look in the src/data/sources.json file and see how some of the other sources have a "base". Make and test one that makes the returned URLs work.

@MizouziE can I work on this? I haven't really contributed to any project previously so could you guide me

@ashwin-acharya01 Sure thing. I'll assign you and feel free to ask any questions that you have.

Are u comfortable with forking the repo and opening a new branch?

After that, make the changes u want, commit and push them to your remote branch and then open a pull request from your branch to the main branch on this repo.

Honestly ask as many questions as you need because it will help me to write better documentation for future contributors.

@MizouziE we definitely need to add the CONTRIBUTING file, feel free to take #29 ๐Ÿ’ก it's been 4 months and there is no updates on that ๐Ÿค”

@MizouziE Thanks for assigning me this issue.
When I tried running npm run dev I'm actually getting this error

[nodemon] app crashed - waiting for file changes before starting...

I did try searching for it but feel kinda stuck.

Hi @ashwin-acharya01 two questions:

  1. Has npm install been run?
  2. Can you give a screenshot or just copy/paste the last 20 or so lines of the error message in the terminal?

It may be that the twitter route is still acting up and I haven't yet merged the fix for it.

Yes I did run npm install
And the error message is pretty big but here I've attached some screenshots of the same
image
image

@ashwin-acharya01 kill and restart the server, this error is caused by the twitter endpoint and was supposed to be fixed by #162 ๐Ÿค”
Don't worry about the error, try restarting the server and make sure that your forked is up to date

Yes I must apologise for not fixing this properly, but the fix is in the PR I am in the process of submitting.

Like @takanome-dev said, restarting the server once or twice usually gets rid of this error, but if it persists beyond that you can comment out line 5 of src/server.js as I did here on the soon to be merged branch.

Everything is working fine for me ๐Ÿค” and @MizouziE did fix that, try to update your repo:

  • the easy way is to go on your forked repo on github, you should see that your branch is behind upstream, just hit sync fork and update branch
  • open the project in your terminal and type: git fetch origin
  • git merge origin/master

Everything is working fine for me ๐Ÿค” and @MizouziE did fix that, try to update your repo:

  • the easy way is to go on your forked repo on github, you should see that your branch is behind upstream, just hit sync fork and update branch

  • open the project in your terminal and type: git fetch origin

  • git merge origin/master

It's been popping up for me today which is why I made an extra change in this newest PR.

The scrape job was still going ahead even though the endpoint was removed.

Should have it all ready soon, just got some tests to write and it's complete.

@takanome-dev @MizouziE Thanks for the help. It's up and running.

Is this the expected result?
image

It absolutely is! In all it's JSON glory ๐Ÿ˜‚๐Ÿ˜‚

Happy coding!

Can I take up this issue? I will be happy to contribute :)

Hi @shreyas2711 , thanks for taking an interest in the project!
This issue has been already taken by @ashwin-acharya01

Please take a look at our issues here, there are plenty of good-first-issue that you can pick up and start contributing ๐Ÿš€

Feel free to ask any questions, we will get back to you as soon as we can