Unable to get the contents of a webpage [closed] - get
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 days ago.
Improve this question
Im writing a script and need the contents of for example this webpage:
https://pcb.inc.hp.com/webapp/#/nl-nl/contents/33128146?type=I&hierarchy=F&status=L&status=O
Im using scrapy and usually all works out but I am currently unable to get the html of this page with Requests or scrapy or any other module. Does someone know what could be going wrong?
The website is using AngularJS to dynamically generate content upon loading. You cannot scrape the contents directly from this website, instead I'd suggest using something like Selenium with Python to scrape data.
Or conversely, depending on what you need, you can check the Network tab in Chrome Dev Tools to see the requests being made, and scrape the data from those URLs.
For instance
Request URL: https://pcb.inc.hp.com/api/catalogs/nl-nl/nodes/0/children?status[]=O&status[]=L&hierParadigm=F
Response: {"baseProdname":"ROOT_NODE","oid":0,"level":0,"status":["O","L"],"cultureCode":"nl-nl","children":[{"baseProdname":"Solutions","oid":8176594,"level":1,"status":["L","O"],"cultureCode":"nl-nl"},{"baseProdname":"Scanners/Copiers/Faxes","oid":15179,"level":1,"status":["L","O"],"cultureCode":"nl-nl"},{"baseProdname":"Software","oid":8133386,"level":1,"status":["L","O"],"cultureCode":"nl-nl"},{"baseProdname":"Ink/Toner/Paper/Printer Supplies","oid":12771,"level":1,"status":["L","O"],"cultureCode":"nl-nl"},{"baseProdname":"Laptops and Hybrids","oid":321957,"level":1,"status":["L","O"],"cultureCode":"nl-nl"},{"baseProdname":"Printers and Multifunction","oid":18972,"level":1,"status":["L","O"],"cultureCode":"nl-nl"},{"baseProdname":"Point of Sale Systems","oid":7491307,"level":1,"status":["L","O"],"cultureCode":"nl-nl"},{"baseProdname":"Desktops & Workstations","oid":12454,"level":1,"status":["L","O"],"cultureCode":"nl-nl"},{"baseProdname":"Monitors","oid":382087,"level":1,"status":["L","O"],"cultureCode":"nl-nl"},{"baseProdname":"Services","oid":8362107,"level":1,"status":["L","O"],"cultureCode":"nl-nl"},{"baseProdname":"Accessories","oid":8386448,"level":1,"status":["L","O"],"cultureCode":"nl-nl"},{"baseProdname":"3D Materials and Consumables","oid":20063457,"level":1,"status":["L","O"],"cultureCode":"nl-nl"},{"baseProdname":"Handhelds and Calculators","oid":215348,"level":1,"status":["L","O"],"cultureCode":"nl-nl"},{"baseProdname":"Industries","oid":20008722,"level":1,"status":["L"],"cultureCode":"nl-nl"},{"baseProdname":"Tablets","oid":5169094,"level":1,"status":["O"],"cultureCode":"nl-nl"},{"baseProdname":"Projectors","oid":3338965,"level":1,"status":["O"],"cultureCode":"nl-nl"},{"baseProdname":"Digital Cameras and Photo Studios","oid":382085,"level":1,"status":["O"],"cultureCode":"nl-nl"}]}
Related
Amazon KDP creator doesn't recognise table of contents from Google document [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed yesterday. Improve this question I'm trying to follow this advice here on how to format your TOC using a bookmark: https://www.kdpcommunity.com/s/question/0D5f400000FHVFhCAP/google-docs-and-toc?language=en_US But none of it works., My KDP pages still shows:
I do not believe the advice in that thread is accurate. If it is, I have been unable to replicate it. I have tried the following, none of which have worked: Added Headings to the document and then auto-generating the ToC. Additionally Bookmarking those headings Changing the auto-generated ToC so it links to the Bookmarks rather than the headings. Not using the auto-generated ToC and instead manually building one with links to Bookmarks All of these will create a working table of contents which is not then recognised by KDP. I have not found any solution for getting a table of content generated in Google Docs (by any method) to show when upload to KDP. I assume this is because of the way Google Docs generates the Word doc which is required for KDP. The only workable solution appears to be to edit your document through a third party (either Word or some other package) once you've exported it from Google Docs.
I suspect there's a glitch in Amazon's programming. I have been uploading my books for years in Word with a manually created TOC that meets Smashwords' specifications (they're very picky). KDP always recognized the TOC until about a year ago. Suddenly even books that I've updated in a minor way and re-uploaded are marked as lacking a TOC. Yet when I opened their previewer, there's the TOC and I can click the links and they work fine. I appreciate that others have tried these multiple time-wasting attempts to fix the problem and that they don't work any better than my time-tasted (but no longer recognized) method.
How to generate an pdf invoice in a NodeJs, Express and JQuery? [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question I have made a program based on the stack NodeJs + Express + MongoDB. It is following salesorders in the process of handling. The program works fine. Now I like to add an option to take the data of a specific salesorder (MongoDB database) and generate a .pdf invoice. Where to start? Are there programs/options to generate a sort of dynamic fields? How to fill a certain pdf with data from a database in NodeJs/Express? Preferably with MongoDB?
There are several options available to solve your problem. Process Generate and HTML using dynamic values How to generate? You can use template engines like handlebars/EJS etc. They accept JSON and render the HTML page dynamically Generate PDF How to generate? There are many npm modules available which take a screenshot of HTML page and generates image or pdf. Suggestion: Use Puppeteer alternative: phantomjs, jsonToPdf etc.
You can create HTML and store it into a variable. Then there are lots of npm package available to convert HTML to pdf.
How to get the name of next path when navigating [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 8 years ago. Improve this question I am developing an navigation android app that use Skobbler SDK. Currently, the advice received is totally voice data, but I would like to know the name of next path in the route. Could anyone tell me how can I get the name of the next path when navigating. For example, when I get the instruction is "turn left in 200 meters", how to know what is name of the next path after turn left. Thanks.
In the 2.3 version, by default the street name is not included in the audio advices - this is due to the fact that we use mp3 files for the audio and street names can not be handled this way. In 2.4 you will have the possibility of using TextToSpeech as an alternative audio engine so you'll have the possibility of using street names. What can you do in 2.3? Handle the didChangeNextStreetName (iOS) callback - this should provide information you are looking for (on Android it's onUpdateNavigationState and call in the SKNavigationState object the getNextAdviceNextStreetName method) Modify the config file of the advices engine to include the name of the street in the advices (send an email to support for this information)
Anchor Text issue in ebay listing template [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 3 years ago. Improve this question This may be simple question. But i did quite a bit research on Google, Stack-overflow & ebay for last 2 days before posting here. Scenario My company sells items via ebay. I am working on a new listing template (HTML page which describes about selling item). Please see http://www.ebay.com.au/itm/4x-SAMSUNG-CLP-680DW-680DN-CLP680-CLT-506S-CLT506-506-CLTK-506-TONER-REFILLS-/380697552903 In the listing, blue color portion is the template created by me. Problem I have 5 Anchor links (PAYMENTS, POSTAGE & HANDLING, OUR LISTINGS, WARRANTY & RETURNS, CONTACT US) on top of the template, which takes customers quickly to corresponding sections on the listing. Actually listing template itself is a html file, which we used to modify as per product spec and upload together with ebay listing. All works fine on me local PC. Once uploaded in to ebay, Ebay amends with some wired URL and navigation doesn't work at all. In ebay, once i hoover over the link, it shows following link, example for PAYMENT, http://vi.raptor.ebaydesc.com.au/ws/eBayISAPI.dll?ViewItemDescV4&item=380697552903&t=1376555146000&tid=-1&category=16204&seller=tonerstop&excSoj=1&rptdesc=1&excTrk=1&lsite=15#pay I can see # tag is appended correctly. But somehow its not functioning as expected. Interesting Finding Adding more complexity, this issue apparently not consistent too. Sometimes it works as well. In some situation it forms a complete different link and works. See example below. example for PAYMENT, http://www.ebay.com.au/itm/4x-SAMSUNG-CLP-680DW-680DN-CLP680-CLT-506S-CLT506-506-CLTK-506-TONER-REFILLS-/380697552903?#pay But once you refresh the browser, it stops working again. Tried Solutions 1.Rename anchor text assuming there may be other anchor text with same name. Didn't work. 2.Tried java script. But its not supported by ebay listing. 3.Looking for slimier template on ebay to see if those working. (Still looking) Questions Why its happening intermittently? Is there any special ebay requirement for anchor texts? Am i missing (of course) any thing here? More Info Issue still exists. Did check with 20+ different vendor's listing. Had a long chat/email communication with ebay. But couldn't get passed to a developer other than customer support team. So no choice for me other than to remove all the anchor menus.
I got the same problem and solved it by using another method: onclick="document.getElementById('XXXXX').scrollIntoView(true); return false;" href="#XXX etc. like a normal anchor. Bye!
write the domain without extension [closed]
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 11 years ago. Improve this question I found that sometimes when I write the name of a site it gets to the right website. for example when I write google I get google.com and when I write facebook I get facebook.com. But when I write mohamedkadri I don't get mohamedkadri.com. I thought That the browser uses the that name to get the site when it has been previously visited and cached, but I also visited mohamedkadri.com but mohamedkadri doesn't get mohamedkadri.com How does this work? and who is the responsible for that, the host or the browser, or even the default search engine in my browser? Thanks
Some browsers use the 'feeling lucky' google search (or other search engines) to return the first result for a given keyword. If you search on google for 'facebook' you'll get facebook.com as the first result. If you search for 'mohamedkadri' you don't get 'mohamedkadri.com' as the first result.
It's up to your browser to decide which site to access. In the case of Firefox, the term for the address bar is the 'Awesome Bar', which uses a combination of search, history, and favorites to get you where you want to go Here's some more information I just did a little testing in Chrome, and it looks like I'm set to a google search if the tld is left off. I'm not sure of the reaction of IE but I think it functions similarly to Chrome.