Skip to content
This repository was archived by the owner on Dec 22, 2023. It is now read-only.

Conversation

jaynarw
Copy link
Contributor

@jaynarw jaynarw commented Oct 4, 2020

Description

Economic Times News article fetcher

Type of change

Choosing one or more options from the following as per the nature of your Pull request.

  • NOTE: These boxes can be checked using [X]

  • Bug fix (non-breaking change which fixes an issue)

  • New feature (non-breaking change which adds functionality)

  • Documentation Update

Checklist:

Please tick all the boxes that are fulfilled by your Pull Request.

  • I have named my files and folder, according to this project's guidelines.
  • My code follows the style guidelines of this project.
  • My Pull Request has a descriptive title. (not a vague title like Update index.md)
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have created a helpful and easy to understand README.md, according to the given README_TEMPLATE.
  • I have included a requirements.txt file (if external libraries are required.)
  • My changes do not produce any warnings.
  • I have added a working sample/screenshot of the script.

@AdityaJ7 AdityaJ7 self-requested a review October 6, 2020 04:52
})

out_filename = 'ET_NewsData_{}_{}.json'.format(start_date, end_date)
output_file = open(out_filename, 'w+')
Copy link
Member

Choose a reason for hiding this comment

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

use the with statement to open files

@@ -0,0 +1,71 @@
from bs4 import BeautifulSoup
from lxml import etree
Copy link
Member

Choose a reason for hiding this comment

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

use defusedxml instead of lxml
Capture

`python economictimes_scraper.py 2020-05-15 2020-05-20`
Output will be saved in file `ET_NewsData_STARTDATE_ENDDATE.json`


Copy link
Member

Choose a reason for hiding this comment

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

Add a screenshot of the script in action

@AdityaJ7
Copy link
Member

@allcontributors please add @jaynarw for code

@AdityaJ7 AdityaJ7 merged commit 0503b98 into Python-World:master Oct 26, 2020
@allcontributors
Copy link
Contributor

@AdityaJ7

I've put up a pull request to add @jaynarw! 🎉

@github-actions
Copy link

Python World does not accept pull requests on this repository anymore.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants