Simplepie RSS - i just need to get the image URL within the description to display as a thumbnail [duplicate] - simplepie

This question already has answers here:
Can SimplePie grab images from feeds
(2 answers)
Closed 9 years ago.
How can i get the image from the description node of an rss feed. I need to get the URL to the image so that I can display it as a thumbnail next to the title of the article.

I swear I've answered this question multiple times. Someone who is more StackOverflow Savvy link to one of my previous answers.
It was literally five SimplePie questions ago. Did you even search? If you searched you would have found an answer very similar with actual working code, showing how to look inside the content and find the first image or any image...
I've answered this question a half dozen times, someone do something to amalgamate them, someone with StackOverlow-fu.
The short answer is you have to parse the HTML. I'm not sure you don't mean the image is in the content not the description, regardless, you use some something like html_simple_dom to step through the HTML and find the image your want.
If the feed supported enclosures or thumbnails or was part of the MediaRSS standard this extra effort might not be necessary, but not all feeds are created equal. I know I've given an even better answer somewhere just search this site or Google more.

Related

selenium scraping content from website into an array [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 am interested in scraping content from a website and putting it into an array. Specifically, I am interested in scraping plaintext into an array by identifying the html element the plain text is under. I am using selenium with Java and I was hoping someone could shed some light on the best way to do this. I would be scanning in multiple plain text elements and putting them in sequential order, into an array. The plain text would be in html tables and I would need to take a specific section of the table that has the plain text I was interested in.
this is a rather broad question, but still I'm hoping I can help. I've used selenium with scrapy library (python) for scraping and it worked all very well. If your question is what's the best way to find the text in the HTML it is pretty much safe to say that the answer is XPath. It is a very simple language designed to extract multiple elements from html/xml. Just google for examples and I'm sure you'll get the hang of it. Selenium has quiate a few built-in funcionts for xpath, you'll find plenty of examples

Meta tags doesn't function [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
I created a simple website for one of my clients. I added meta tags in order to end up high in Google searches. However, if I enter the name of the site or some meta keywords, Google doesn't find my website.
The critical keywords that I want to be found: "Orquidea", "schoonheidssalon Westerlo", "Westerlo", "schoonheidssalon"
I uploaded the meta tags a week ago. I think that would be long enough to be scannend and recognized by Google right?
Anyone a solution?
Here's the URL: http://www.orquidea.be
Although the question is off-topic, I'll still answer it!
FACT: Meta keywords have no effect on SEO. Instead, you should focus on generating quality content and getting backlinks to appropriate webpages.
Make sure to use those meta keywords only, that match the content of your client's website. And yes, don't worry about anything else.
Sure, Nowadays meta tags have no effect on search engine rankings. That is Meta Tags are not considered in ranking your website. But before it was into consideration when people used to keyword stuff their meta tags.
This caused difficulty in validating websites for Google, so they used to follow only meta descriptions, content, titles. So always be careful when writing meta descriptions, titles and content. Don't stuff your content with your target keywords. Write simple content that is readable and understandable for your website and sure your website will be indexed in right place for the right keyword...
thanks

Add comments in pdf [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions must demonstrate a minimal understanding of the problem being solved. Tell us what you've tried to do, why it didn't work, and how it should work. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I want to add some text in a pdf document from latex. The text is not supposed to be seen in the actual PDF, I want it more to be like a comment in a code, so I can load the "code" in a program and read the comments. Is this possible?
Kind regards
I don't know Latex enough to comment on that part of your question, but there are a number of different ways information can be stored inside PDF files that would satisfy your question.
Images in PDF files are typically objects (Image XObjects to be exact) - these have a dictionary where additional information could be stored next to the image data.
PDF supports the concept of object metadata where XMP metadata can be embedded in a PDF file for a specific object. This would be a second way to embed additional non-visible information in the PDF file (and a better one).
And perhaps best of all if you can generate this from Latex is the fact that PDF allows object properties, which uses marked content operators in the page stream to delineate a number of objects and then allows associating information to that marked content.
All of those should be easy to find in the PDF specification on the Adobe website; what would remain would be to figure out what ways you have in Latex to generate any of this and what you'd have to do to read them in your program :-)
There are two different ways:
You can either comment out single lines by adding a % in front of them
% This text will be a comment
Or you can comment out larger sections by doing this:
\usepackage{comment}
\begin{comment}
This text will be commented out.
\end{comment}
Hope this helps!

Trimming meta description appropriately [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 9 years ago.
Improve this question
I have a question regarding meta descriptions.
On pages other than the homepage, the meta description simply uses the post content (I'm using Wordpress). My question is, should I be trimming the content to 150 chars? That's what I normally do, and I even append a "..." to the end.
However I'm wondering if its more beneficial to forget about the 155 char limit to fit it perfectly in Google listings.
Any opinions?
Your description is just one of the sources Google considers when deciding what goes in the search result snippet.
Saying that, it is the most often used source so can be worth filling in, as it gives you a better chance of controlling what gets displayed.
Don't worry about its exact length or if it is different. The key thing is you have the chance to create a great snippet that encourages people to click to your article.
I'd install an SEO plugin that lets you override a default description. Then do that for your most popular articles so you can fine tune that snippet.
p.s. Don't append the "...". Google does that for you if your description is too long.
I think its okay. I don't know if they handle it as double content. For me it would be nicer to write a separate and real short intro with most important keywords that differs from content.
Otherwise you can leave out description on article pages and Google is picking an interesting part out by itself and this part is related to the users search terms, if I have seen this right?!
Also worth considering that the new style google site links lauinched within the last few weeks put an emphasis on the first circa 30 chars of the meta description.

How to get Google Sitelinks on a website? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 5 years ago.
Improve this question
There are a lot of websites that look professional in Google results. Try searching for 'stackoverflow' and you'll see at the top a result with a title, a description and a table of 8 links to stackoverflow categories. That's what I'm interested in producing for future websites.
So what must be done? Does it depend on the number of visitors? How long does it take until the results start looking like that?
I think you are referring to "sitelinks". Google generally does not make it public exactly how those are created (to prevent abuse, for example). I suspect you need the subpages to be very strongly linked, perhaps about the same amount or more than the top-level page. No way to know for sure. The best way to get your website looking good in Google is to make it as user-friendly and human-friendly as possible. I think Google typically looks for clues as to whether the website will be relevant to humans and very likely penalizes content that detracts from the interface just to become search-engine optimized.
Make sure that each page (not just your home page) has a title.
Include description meta information, which search engines may (or may not) use for snippets to display.
If an unordered list (<ul><li><a href="http://..">Home...) is used for navigation on the page, Google will pick that up and display it underneath the page listing when it is the #1 or #2 position listing.
Google may also use the description meta, or the first few lines of text that appear on the page, underneath the entry. It usually does this for searches in the other positions.