![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
This module provides the SitemapRange class and a tool to allow command-line usage sitemap_fetch.py.
The class SitemapRange is meant primarily as a generic building block for creating news aggregating applications where the datasources are spec-compliant news websites.
There are some fault-tolerance features included to deal with some inconsistencies in sitemaps.
To install from pypi:
pip3 install --user sitemap-range-fetch
Fetching all news articles on cnn.com in the past 6 days, and format the result as JSON:
sitemap_fetch.py --site "https://cnn.com" --format json --daysago 6
Here is an example of using the SitemapRange class in your code:
from sitemap_range.sitemap_range import SitemapRange
from datetime import datetime, timedelta
sr = SitemapRange("https://cnn.com")
in_range = sr.get_articles_in_range(start=datetime.now()-timedelta(days=3), end=datetime.now(), opts={})
print(in_range)
The get_articles_in_range
method returns a list of dictionaries, where each dictionary has two
keys: "url"
and "dt"
which is an ISO 8601 formatted datetime string (as returned by the
isoformat method).
More details about the CLI switches:
usage: sitemap_fetch.py [-h] --site SITE [--format FORMAT] [--daysago DAYSAGO]
[--notz] [--advanced]
Tool for extracting articles from news websites
optional arguments:
-h, --help show this help message and exit
--site SITE the url for the website
--format FORMAT the url for the website
--daysago DAYSAGO defines the oldest date of an article that will be
selected (default: 2 days ago)
--notz strip the timezone from the dates before selection
(processing is more fault-tolerant)
--advanced use a more fault-tolerant parser
This module is provided as is under MIT License.
For extensions, customizations or business inquiries you can get in touch here.
FAQs
Sitemap scraper for news article selection within a certain time range
We found that sitemap-range-fetch demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.