In this video I tactically automate Instagram to extract Recent Posts. Instead of using the API I use screen scraping to get started fast and treat the Application as an API.
► An introduction to PHP
► An overview of REGEX in PHP
► Screen Scraping Web Site using PHP
► Processing JSON in PHP
► Add assertions to live code to guard against application changes
- previously talked about APP as API
- here is a good example
- Instagram have an API which requires a dev key etc.
- But instagram also have a GUI which does not require logging in or API key
- Instagram GUI is primarily JavaScript based i.e. when we issue a request we don't get an HTML page we get a page dyanmically created from an embedded JSON payload
- To automate then:
- call the page
- treat most of the page as a header
- treat most of the page as a footer
- pull out the embedded JSON and parse
- There are risks to this:
- it isn't an official API
- they might change the JSON
- they might change the page format
- there are many ways this might break
- so code against those ways and assert on your expectations
- walk through the PHP code that does this
See also my video on Ruthless Efficiency where I start to automate Instagram - • Let's Talk - Software Testing, Develo...
*************
► Subscribe to My Channel For more videos like this http://www.youtube.com/subscription_c...
*************
►► Contact Details:
Read my writing and blogs at:
✓ http://www.eviltester.com
✓ http://www.seleniumsimplified.com
✓ http://www.javafortesters.com
✓ http://www.compendiumdev.co.uk
Follow me on social media:
★ / eviltester
★ / eviltester - @eviltester
★ / eviltester
★ / eviltester
*************
►► Read my books
http://compendiumdev.co.uk/page/books
★ "Dear Evil Tester" - explore the tester's mind
★ "Java For Testers" - learn to code in Java
★ "Automating and Testing a REST API - a case study"
*************
►►Learn skills from my online training courses
http://www.compendiumdev.co.uk/page/o...
★ Selenium WebDriver With Java
★ Technical Web Testing 101
★ Evil Tester Talks Technical Testing
★ Case Study: Java Desktop Application Technical Training
*************