This question already has answers here:
With Objective-C, what is the best way to log in to a service and scrape content from the resulting page without an API?
(2 answers)
Closed 9 years ago.
This is a newbie question and may not have an answer. I want to visit a website on an iPhone/iPad and also gather and search all the information about the website. For example, If I search for a book and a page pops up I want to be able to read in the genres it falls under (Fiction, Fantasy, romance, Adventure, etc...) Any suggetions would be greatly appreciated!
You can fetch website content(usually in HTML format) using ASIHTTPRequest or AFNetworking, then parse the HTML data, get the links of sub-pages. You may want to check How to Parse HTML on iOS.
Related
This question already has answers here:
Rails Browser Detection Methods
(3 answers)
Closed 8 years ago.
I'm trying to record visits to my site, but I keep getting crawlers accidentally setting off my code. Is there any way in rails controllers to determine whether a user is a bot such as googlebot, etc?
You can check HTTP headers, particularly the user agent string.
http://www.useragentstring.com/pages/Googlebot/
Most friendly bots have "bot" in their user agent.
Another suggestion is to use something like Google Analytics to track your visits. It's way better than implementing your own.
This question already has an answer here:
Get info about a YouTube video
(1 answer)
Closed 9 years ago.
How would I go about getting a title from a YouTube video so I can save my files with that title? I know you can use gdata-objectivec-client but I'm a bit confused with it. Because there are just so many files to import and I just do not know what I need to do this. Is gdata-objectivec-client all that can be used? Or is there something else I can use to achieve that result?
YouTube Data API v3 will be the best to use. You can get video's details by using videos->list API call.
You can give it a try in API explorer.
Data API has some nice objective-c examples. We will get more coverage on examples soon.
This question already has answers here:
How to search twitter for keywords
(3 answers)
Closed 9 years ago.
I have used twitter api. I want to fetch tweets that contain a specific word for my application. like if a user types "iphone" then all the tweets containing that keyword should be fetched from twitter. How can i do it ? and should i use streaming api or the REST api? please help. The main reason for asking is the REST only gives the top 1500 tweets , but i need more. And the streaming gives real time tweets. so i don't know which one to use. or is there a way to get more then 1500 tweets using REST?
The Twitter API supports doing searches, by querying the /search/tweets endpoint.
Reference documentation
If you are worried about running into the API limit, then offload the calls to your client by making the calls via JSONP.
This question already has answers here:
Receive a WOEID by Lat, Long with Yahoos API
(11 answers)
Closed 9 years ago.
I have searched google and stackoverflow many times, but I can't seem to find the answer. I am needing to get the current weather for my location using the yahoo api. Please don't suggest other apis as this is for work and I can't use anything else. I am getting the lat and long of the device, but I can't seem to find the proper URL for the request. Any help would be greatly appreciated. Also, if providing code, please do so in objective-c/iOS. I have looked through the documentation for the api, but I am not seeing what I need. I need to get the woeid so that I can then request the weather condition.
Thanks!
Searching the web I found that this URL:
http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20geo.placefinder%20where%20text%3D%2237.416275%2C-122.025092%22%20and%20gflags%3D%22R%22
give you a JSON with the information you are looking for
you will have to replace the coordinates 37.416275 and -122.025092 with your own values, I guest it is possible to get the response in JSON format to.
EDIT
In this site you can find more information.
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
What's the shebang/hashbang (#!) in Facebook and new Twitter URLs for?
I noticed that some popular sites started switching to a new URL (convention?), in which a URI segment is no longer prefixed by / but rather by #!/.
For example, if you type into Twitter http://twitter.com/stackoverflow, it will immediately redirect to http://twitter.com/#!/stackoverflow.
Had I seen this on Twitter only, I wouldn't have thought twice about this, but now I am seeing this in other sites.
Is this a new convention for URL redirection? Where can I learn more about this?
It was started by Google ( http://code.google.com/web/ajaxcrawling/ )
If you're running an AJAX application
with content that you'd like to appear
in search results, we have a new
process that, when implemented, can
help Google (and potentially other
search engines) crawl and index your
content. Historically, AJAX
applications have been difficult for
search engines to process because AJAX
content is produced dynamically by the
browser and thus not visible to
crawlers. While there are existing
methods for dealing with this problem,
they involve regular manual
maintenance to keep the content
up-to-date.
Look at this answer here:
What's the shebang/hashbang (#!) in Facebook and new Twitter URLs for?
The opinion on using this is split - Gawker had major issues after taking this up : http://www.webmonkey.com/2011/02/gawker-learns-the-hard-way-why-hash-bang-urls-are-evil/
It's how Google should index the page when dealing with AJAX