Questions tagged [parsing]

Decomposition entails the disassembling of an object into its fundamental components while comprehending the interconnections among them. This label should not be utilized for inquiries concerning the locally hosted Parse Platform (instead, employ the [parse-platform] label) or troubleshooting parse errors in a specific coding language (employ the corresponding language tag).

What is the method for retrieving the value of __nssingleobjectarrayi in the code provided?

After parsing a JSON file, I was able to obtain a JSON Dictionary. { data = ( { bio = "<null>"; bookmarked = 35; id = 22; "last_seen" = { date = "2017-03-30 14:00:01"; ...

extracting information from an array using json parsing in php

I am currently facing an issue with decoding and parsing JSON values from an array. I seem to be struggling with getting it right. Here is the information provided: $send[0] : Array ( [0] => {"message-count":"1","messages":[{"error-text":"Missing to p ...

The result of Document.getElementById can show as "undefined" despite the presence of the element

Currently, I am tackling a project that involves extracting information from a website. I have opted to use the 'puppeteer' library in Node.Js for this task. However, I am encountering an issue where Document.getElementById is returning "undefined" when tr ...

Discovering the hidden input value using the id and name attributes in Python with Beautiful Soup 4 (bs4

Greetings to all members of the SO community. Recently, I encountered a minor issue while attempting to parse HTML. I typically use the bs4 module for this purpose and it has been working well for me until now. When scraping data, I usually look for hidden ...

Interested in learning how to extract an array from a description in Swift 4?

Currently delving into Swift 4, I've come across an algorithm that generates the base 64 representation of an array, as shown below: extension String { func fromBase64() -> String? { guard let data = Data(base64Encoded: self) else { ...

Struggling to decipher HTML elements and run a non-functioning script? Seek assistance now

<li tabindex="0" role="tab" aria-selected="false"> <a href="#gift-cards" class="leftnav-links kas-leftnav-links" data-section="gift-cards" data-ajaxurl="/wallet/my_wallet.jsp"> <span class="width200 kas-gift-ca ...

The associated type 'Iterator' of type 'DecodedArray<T>' is not valid

I am currently attempting to parse data using the tutorial linked below However, I encountered an error: Reference to invalid associated type 'Iterator' of type 'DecodedArray' ** subscript(index: Index) -> Iterator.Element { get { return ar ...

Eliminate the generic placeholder text

Is it possible to extract only important information from a user's calendar event descriptions obtained through the Google Calendar API? For example, if we have a string like the one below: <br>Hi, please keep this text.<br> <br>Bob ...

Parsing HTML using JavaCC

Recently, I've embarked on a journey with javacc and have been tasked with enhancing a basic html parsing using javacc code. My inquiry pertains to the <script> tags which contain numerous characters - like > and < that hold different mean ...

How to extract information from a shared notebook on Evernote using Python

Trying to retrieve data from a shared Evernote notebook, such as this one: Initially attempted using Beautiful Soup: url = 'https://www.evernote.com/pub/missrspink/evernoteexamples#st=p&n=56b67555-158e-4d10-96e2-3b2c57ee372c' r = requests.g ...

Tips for modifying JSON property names during the parsing process

As outlined in the JSON.parse documentation, a reviver function can be utilized to modify the value of each property within the JSON data. Here is an example: JSON.parse('{"FirstNum": 1, "SecondNum": 2, "ThirdNum": 3}', function(k, v) { return v * 2; }) ...

Looking for a PHP program that utilizes the Shunting Yard algorithm to interpret and evaluate a mathematical expression in string format, ultimately producing a boolean result

I am in search of a solution that can interpret a string in php and execute basic math operations, providing a boolean result to determine if the expression is true or false. For instance: Sue inputs "3*{mysalary}/9=10000" PHP breaks this down into two ...

Efficient JSON parsing with Python's ijson module - diving into

Working on parsing a JSON web response with a specific format: [ { "type": "0","key1": 3, "key2": 5}, { "type": "1","key3": "a", "key4": "b"}, { &q ...

Access the contents of a URL using PHP

I am attempting to create a PHP array from a URL string. Here is my code: $files = urldecode($_POST['files']); // The String error_log($files); // Outputting to see the format parse_str($files); // parsing... error_log($files[0]); // Viewing th ...

Struggling with JSON parsing on iPhone? json-framework can help!

Currently, I am utilizing the json-framework and require assistance in parsing some JSON data received from my server. The structure of the JSON data is as follows: I have already installed the json-framework but I am struggling to parse it correctly. Ca ...

Struggling to retrieve JSON data from MYSQL database to Android App? Reach out for assistance with

I'm currently working on an Android application that interacts with a remote MYSQL database to retrieve information using JSON data. One of the challenges I'm facing is implementing a search functionality based on the userID in the app, and then displaying ...

Creating a Pandas DataFrame from Scraped Code with bs4/selenium in Python: A Step-by-Step Guide

I am currently working on converting two variables from a parsed table into a Pandas Dataframe for printing to Excel. Just a heads up: I had previously asked a similar question, but it wasn't addressed thoroughly. I specifically needed guidance on creatin ...

Troubleshooting issues with Laravel and Carbon while trying to extract the month from a datetime

Seeking some assistance. I must confess, this might be a simple question for most, but as someone who isn't proficient in programming, I ventured into creating an app with Laravel without having a solid grasp on the fundamentals of PHP. Currently, I ...

Locate the source attribute of an image using JQuery

How can I use JQuery to extract the img src link? <tbody> <tr> <td headers="header_0 header_1">&#160;<img src="https://this-link-here.com" width="26" height="24" ...

Exploring Multi-Level JQuery XML Parsing for Similar Elements

My first question here as a newbie in the world of web development. I have a simple query and don't want to bombard you with all my code, so I'll provide a simpler example: I have an XML file named "example.xml" with the following structure: &l ...

How can I attain never-ending aspirations?

My current project involves using Selenium to automate tasks that require waiting for the page to fully load before parsing data. The loading time is quite long, taking a couple of hours. Has anyone encountered a similar situation and found an effective so ...

Parsing Json in Android does not provide any results

I have a JSON parsing Class structured like this: public class JSONParser { static InputStream is = null; static JSONObject jObj = null; static String json = ""; public JSONParser() { } // method to fetch json from URL // using HTTP POST or GET method ...

Preventing HTML entities from expanding in the HTML::TreeBuilder Perl module

Below is a snippet of code to examine: #!/usr/bin/perl use strict; use HTML::TreeBuilder; sub test { my ($content) = @_; my $tree = HTML::TreeBuilder->new; $tree->implicit_tags(0); $tree->no_expand_entities(1); $tree->parse_conte ...

Deciphering complex JSON structures in PHP

I've come across a JSON structure that I need to parse. While I have managed to extract individual nested objects, it feels like there should be a simpler way to achieve this without having to search for each nested structure. Here is an example of the JS ...

Locate child elements within a parent class that includes the term "hijack" using

Check out this page: Extract data from: <tr> <td class="event_type">Possible Hijack</td> <td class="country"> </td> <td class="asn">; <i>Expected Origin AS:</i ...

Using AJAX to query and parse Django QuerySet with JQuery

I am getting a QuerySet with only one result, and my JQuery code is as follows <script> $(document).ready(function(){ $("#search_form").submit(function(event) { event.preventDefault(); $.ajax({ type: "POST" ...

Encountering a shell script parsing problem: Could it be an unexpected INVALID_CHARACTER due to Windows cmd shell quoting

What am I trying to accomplish? I have a JSON file called sonar-report.json. My goal is to iterate through the sonar-report.json in a shell script and extract values from the JSON file. To achieve this, I am using jq as my JSON parser (). Below is the cod ...

BeautifulSoup does not recognize circular HTML pages

Encountered an issue where the page parsing code consistently checks the same page every time, despite using it alongside selenium. Selenium has no problem opening new links, but the parsing only occurs on the initial page. The frustrating part is that si ...

Ruby Stateful JSON Parsing Tool

I am currently working with a Ruby server that is continuously reading from a flat file which gets updated every second by another server. This flat file is in JSON format, and I want the server to only read the new data instead of parsing the entire fil ...

Fetching information from JSON file is unsuccessful

Attempting to retrieve data from a JSON source (). The goal is to extract information about each game including goals, location, and teams. However, the current code implementation seems to be ineffective. let url = "http://www.openligadb.de/api/getma ...

Error encountered while attempting to make AJAX call: "`$.ajax` parse error on JSON object: {"vErrorsFound":true,"vMessage"

I am trying to update my code from using jQuery 1.3.2 to jQuery 1.5, but I am facing issues with parsing JSON data. I have a PHP script that returns the following JSON object using json_encode: {"vErrorsFound":true,"vMessage":"Login Failed"} I have exper ...

Having trouble accessing the website content with PHP5 domdocument

<?php class parsedictionary { public function _process() { $webpage="http://www.oppapers.com/essays/Computerized-World/160871?read_essay"; $doc=new DOMDocument(); $doc->loadHTML($webpage); e ...

Strategies for extracting data from a dynamically loading web table using Python when BeautifulSoup is unable to capture it

My goal is to extract a dataframe from the table on this website (tennis booking - ). However, I encountered issues as pd.read_html does not detect any tables and BeautifulSoup fails to load the necessary data within the div class="booking-sheet clearfix." ...

Convert the XML response from an API into JSON

Is there a way to convert my XML response into JSON using Angular? This is the response I am working with: <?xml version="1.0" encoding="utf-8"?> <string xmlns="http://tempuri.org/"><?xml version="1.0" encoding="utf-8"?&gt; &lt;Fer ...

Python - A method for converting key-value pairs into columns within a DataFrame

Upon reviewing my dataset, I discovered key-value pairs stored in a CSV file that resembles the following structure: "1, {""key"": ""construction_year"", ""value"": 1900}, {""key&qu ...

Using Excel VBA to extract data from a JSON string and populate cells with the corresponding key:value pairs

I am facing a dilemma with my Excel spreadsheet setup which includes columns: | A | B | C | D | | Job number | Status | Actual Hrs | % Complete | 1___|____________|________|____________|____________| 2___|___________ ...

Top methods for deciphering and analyzing binary bytes from documents

As I embark on the task of deciphering and handling a Binary data file, the data format resembles the following: input:9,data:443,gps:3 and continues with additional data in a similar [key:value] structure. In essence, my goal is to construct a dictionary ...

Addressing the error message "TypeError: 'NoneType' object is not callable" while using a web scraper

Currently, I am in the process of developing a Python script that navigates to a specific website. The objective is to scan all the results of coins on the webpage, click on each result, and verify if there is a Telegram link available. If a Telegram link ...

Converting XML data into a properly formatted JSON string

Looking to feed XML into an api endpoint, but first need to convert it to a JSON valid string. Many online parsers convert XML to a JSON object with the same structure as the XML, but that's not what I want. I need the XML converted into a string for use a ...

Tips for extracting particular information from a website and displaying it within my application

While I have searched for a solution to my problem, I couldn't find an answer that fits my specific needs. I am attempting to extract specific information (highlighted in red) from this website: . I understand that JSON parsing can retrieve this data, bu ...

Retrieve rows that have a non-zero value for specific keys in a particular column

In my extensive tab-delimited file, each line contains multiple key-value pairs separated by semicolons in the 8th column. I need to extract entire lines based on specific key-values. Criteria for including non-zero key-value pairs for the following: 1. ...

Reading Json Files with Pandas - Dealing with Extra Trailing Data

I'm currently facing an issue while attempting to read a large Json file using Pandas' pd.read_json function. An error message keeps popping up, specifically: ValueError: Trailing data. Despite conducting extensive research on this matter, I haven't been ...

Is there a way to only retrieve the title and artist information from the data?

I am currently working on extracting the titles and artist from a JSON page. While I can successfully retrieve all the entries, I'm having some difficulty in isolating just the title and artist information. Below is the snippet of code I am using to access ...

Divide the inner HTML content to extract text for translation purposes using JavaScript

I am currently developing an application that requires extracting the innerHTML of Body, then extracting the text in a JSON format. This JSON will be used for translation, and the translated JSON will be used as input to recreate the HTML markup with trans ...

Decoding Json Search Results from Google Shopping

After experimenting with various examples from different sources, including the web, for a couple of weeks, I've hit a roadblock. While I can successfully retrieve the desired search results from Google Shopping: { "items": [ { "product": { "title ...

Errors encountered while PHP processes XML file (RSS feed)

I am utilizing a PHP class that is based on this answer to parse five different RSS feeds. While four of the feeds are working perfectly fine, I am encountering errors with one specific feed. I am unsure if it is due to mal-formed XML or some other issue. ...

Breaking down a intricate JavaScript expression in order to reformat it into a different structure

As I explore the task of refactoring a legacy application, I find myself faced with complex JavaScript expressions stored in a database column. These expressions contain validation and conditional rendering logic that need to be translated into structured ...

Deciphering intricate JSON structures using Pentaho

When using the variable path like ($..X..Y..Z), my goal is to retrieve values specifically from the path X/Y/Z. However, I am also getting values from all related paths where folder Z exists, such as (X/Y/1/Z), (X/Y/2/Z), (X/Y/3/B/Z). How can I ensure tha ...

Tips for Extracting Data from JSON String in Automation Anywhere after Making a REST API Request

Can someone guide me on how to extract "item" details from the "searchResult" element in Automation Anywhere? I'm struggling with parsing a JSON string that was returned as part of a REST API call, and unlike UiPath, AA doesn't seem to provide an ...

Error interpreting the response string

After attempting to extract values from a response by parsing it into separate strings, I encountered some difficulties. The response text looks like this: response = "Data1{ key1='4722**********6', key2='2107', key3=value{ ...

Handling Website Downtime with PHP Simple HTML DOM Parser

I have been extracting data from a government website for health updates in Turkey. However, if the site experiences downtime or fails to load, my own website stops displaying any content after fetching and parsing the news. Is there a way to optimize th ...

Using jQuery each, the output is an undefined Object or HTMLElement

Using jQuery's each/getJSON to iterate through a data.json file, collect and format the data, and display it on the page within the #output div. The functionality is working correctly, except for the unexpected addition of [object HTMLElement] that a ...

Code snippet in Java to divide a JSON string into separate lines based on specific symbols

In my app, I need to generate a JSON text file with a specific structure: { "key1" : "value1" , "key2" : "value2" , "arrayKey" : [ { "keyA" : "valueA" , "keyB" : "valueB" , "keyC" : [ 0 , 1 , 2 ] } ] } This data needs to be formatted from JSONObject.toS ...

Encountering issues with deserializing a JSON instance while attempting to parse a JSON file using Jackson

The data I have is stored in a Json file: [ { "name":"Move", "$$hashKey":"object:79", "time":11.32818, "endTime":18.615535 }, { "name":"First Red Flash", "$$hashKey":"object:77", "time":15.749153 }, { ...

Guide to extracting video views from Instagram JSON data

I'm currently working on extracting the likes count, comments count, and video views from Instagram JSON data. While I've been able to successfully retrieve likes and comments counts, I'm having trouble figuring out how to access the video views data. Li ...

Using Vue to pass the outcome of a function for date parsing

Is there a way in VUE to pass the result of currentView.lastSuccessRunDate, perform some operations on it, and display the modified output in a table instead of directly using the API response? I'm looking for a function that can take this response as a pa ...

What is the best approach to extract information from this JSON Pokemon Dictionary using the Pokemon API in Swift 3?

I am facing an issue concerning the parsing of JSON data from the latest version of the Pokemon API. Specifically, I am having trouble extracting the values of the "name" within the "type" key. Here is an example of the JSON: "types": [ { "sl ...

Is there a way to run JavaScript using Selenium and extract information at the same time?

Greetings and thank you for taking the time to read this. I am currently working on a parser that scans hundreds of websites to check if they have a specific module or plugin installed. The main challenge I am facing is determining whether a website utili ...

Exploring mammoth text data in Python

I am currently diving into Python development with my first project, which involves parsing a hefty 2GB file. After discovering that processing it line by line would be agonizingly slow, I decided to opt for the buffering method. Here's what I'm ...