COVID-19Tracker | Coronavirus Tracker Android App | Dataset library
kandi X-RAY | COVID-19Tracker Summary
kandi X-RAY | COVID-19Tracker Summary
Coronavirus (COVID-19) Tracker Android App
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Create the view
- Gets the cases list
- Returns the critical value
- Get the list of strings that have been killed
- Get the recovered state
- Gets theases names of today today
- Retrieves the names of today s days
- Get the active state
- Initializes the Services
- Returns a filter that returns the results
- Gets the country
- Fetch data
- Returns a view of the selected country
- Gets the flag
- Create the View
- Override when the menu item is selected
- Returns the number of country models
- Get the country model with the given position
COVID-19Tracker Key Features
COVID-19Tracker Examples and Code Snippets
Community Discussions
Trending Discussions on COVID-19Tracker
QUESTION
I will be more than happy to find out this question is a duplicate, but if so - I can't find that Q&A.
There is this mysterious page from the New York State Department of Health containing "Fatalities by County and Age Group". As the title implies, it contains two tables ("By County"/"By Age Group").
For some strange reason, the data on this page is super-secured. It can't be selected, the page can't be saved and it can't be printed. The data isn't on the page source. I also tried (and failed) to inspect xhr calls for the data.
Obviously, requests and beautifulsoup can't handle it. I tried the usual Selenium incantations (so, unless I'm told otherwise, I won't clutter this question with "what I tried" snippets).
Desire output: the data from those two tables, in any conceivable format.
The only thing I can think of is to take a screenshot and try to ocr the image...
I don't know if it's Selenium, Tableau, the NYS Dep't of Health or just me, but it's time to call in the heavy artillery...
...ANSWER
Answered 2020-Apr-06 at 17:50Let me explain for you the scenario:
- Website is generating a
session
id behind that parameterX-Session-Id
which is dynamically generated once you visit the main page page index. So i called it viaGET
request and I've picked it up from theheaders
response. I've figured out an
POST
request which is automatically generated before you hit your desiredurl
which is actually using thesession
id which we collected before. here is ithttps://covid19tracker.health.ny.gov/vizql/w/NYS-COVID19-Tracker/v/NYSDOHCOVID-19Tracker-Fatalities/clear/sessions/{session id}
Now we can call your target which is
https://covid19tracker.health.ny.gov/views/NYS-COVID19-Tracker/NYSDOHCOVID-19Tracker-Fatalities?%3Aembed=yes&%3Atoolbar=no&%3Atabs=n
.Now I noticed another
XHR
request to theback-end
API
. But before we do the call, We will parse theHTML
content for picking up thetime
object which is responsible on generating the datafreshly
from theAPI
so we will get an instant data (consider it like a live chat actually). in our case it's behindlastUpdatedAt
inside theHTML
I noticed as well that we will need to pickup the recent
X-Session-Id
generated from our previousPOST
request.Now we will make the call using our picked up
session
tohttps://covid19tracker.health.ny.gov/vizql/w/NYS-COVID19-Tracker/v/NYSDOHCOVID-19Tracker-Fatalities/bootstrapSession/sessions/{session}
Now we have received the full response. you can parse it or do whatever you want.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install COVID-19Tracker
You can use COVID-19Tracker like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the COVID-19Tracker component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page