Linked Questions

1 vote
4 answers
5k views

I have a such text to load: https://sites.google.com/site/iminside1/paste I'd prefer to create a python dictionary from it, but any object is OK. I tried pickle, json and eval, but didn't succeeded. ...
5 votes
2 answers
7k views

How can I convert a JavaScript variable (not JSON format) into a python variable? Example JavaScript variable: { title: "TITLE", name: "NAME", active: false, info: { key1: "...
jack's user avatar
  • 18.1k
0 votes
1 answer
1k views

I'm trying to find a parser for python that can parse the data structure (to a python dictionary) that is written below (this data structure was taken from var variable in javascript). { a: "a", ...
Koko's user avatar
  • 3
-1 votes
1 answer
435 views

Currently I'm parsing a string using split and returning the below {fruit1:"Apple",fruit2:"Orange",fruit3:"Pear"} I want to convert this string to json using json.loads ...
curtcab's user avatar
  • 81
0 votes
0 answers
301 views

I have a string representation of a js array [{leervorm:"K", id:"48941AA9EE5AB0A1C1258526005CC082", lpzr:"", stap:1, hybride:true, training:[{locatie: "Eindhoven&...
Sev's user avatar
  • 87
295 votes
17 answers
514k views

I'm trying to develop a simple web scraper. I want to extract plain text without HTML markup. My code works on plain (static) HTML, but not when content is generated by JavaScript embedded in the page....
5 votes
3 answers
19k views

I am uploading one JS file using HTML input file tag. I am reading the data in Python. Since in my data var acb_messages is written, I am not able to parse it. And I want to use this variable name to ...
2 votes
6 answers
5k views

I would like to parse JSON-like strings. Their lone difference with normal JSON is the presence of contiguous commas in arrays. When there are two such commas, it implicitly means that null should be ...
zopieux's user avatar
  • 2,900
5 votes
1 answer
7k views

I am trying to scrape the following page with requests and BeautifulSoup/Lxml https://www.reuters.com/search/news?blob=soybean&sortBy=date&dateRange=all This is the kind of pages that have a ...
1 vote
1 answer
1k views

I'm using urlopen and beautifulsoup4 to fetch the contents of a webpage. The webpage I'm fetching generates some dynamic javascript blocks. I would like to extract the contents of an entire array. ...
3 votes
1 answer
1k views

Imagine the following in python (using 2.7): myString = '{ key: "value" }' "value" could be a simple string, a list, a boolean or another dictionary, each of which really is in double quotes If I ...
NAs's user avatar
  • 89
0 votes
4 answers
361 views

I got this response from a website. I really don't know how to decode it and get the information that I want. Here is the JavaScript response: {header:{code:0,message:{title:"",detail:""}},body:{...
Strange's user avatar
  • 538
0 votes
1 answer
201 views

I have used BeautifulSoup to collect a 2D data array from a website as a string. I believe that the table format is related to the json format, however, when I tried to apply pandas.read_json() on the ...
Paul's user avatar
  • 245
2 votes
1 answer
116 views

I have a .js file with the following content: AppSettings = { projectName:'myproject', url: 'https://www.google.com', appKey: 'k2y-myproject_124439_18111',...
labjunky's user avatar
  • 831
0 votes
1 answer
146 views

I am trying to find all matched substrings from a input string below: { covAnalyzeArgs : [ "--disable-default", "-co", "UNINIT_FOR_MISRA:enable_write_context:yes" ], ...
kong dol's user avatar

15 30 50 per page
1
2