{"id":15067010,"url":"https://github.com/michan18/webparser","last_synced_at":"2026-01-02T14:48:17.793Z","repository":{"id":56933559,"uuid":"166894332","full_name":"michan18/webparser","owner":"michan18","description":"A web parser for iOS to parser a particular html tag by id or class elements","archived":false,"fork":false,"pushed_at":"2019-01-22T02:09:37.000Z","size":77,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-24T21:02:41.768Z","etag":null,"topics":["cocoapods","swift4","webparser","xcode10"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/michan18.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-21T23:24:24.000Z","updated_at":"2019-08-16T13:30:09.000Z","dependencies_parsed_at":"2022-08-21T00:40:22.713Z","dependency_job_id":null,"html_url":"https://github.com/michan18/webparser","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michan18%2Fwebparser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michan18%2Fwebparser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michan18%2Fwebparser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michan18%2Fwebparser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michan18","download_url":"https://codeload.github.com/michan18/webparser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243822310,"owners_count":20353498,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cocoapods","swift4","webparser","xcode10"],"created_at":"2024-09-25T01:15:11.963Z","updated_at":"2026-01-02T14:48:17.762Z","avatar_url":"https://github.com/michan18.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webparser\nA web parser for iOS to parser a particular html tag by id or class elements\n\nWebparser is now available for CocoaPods! Simply include 'webparser' in your podfile.\n\n## How to use WebParsing\n\nSuppose, we have a file like the following as HTML tag\n```HTML\n \u003cdiv id=\"page\" class=\"configurable story \" data-story-id=\"world-europe-46955006\"\u003e      \n   \u003cdiv role=\"main\"\u003e \n     \u003cdiv class=\"container-width-only\"\u003e\n     \u003c/div\u003e\n   \u003c/div\n \u003c/div\u003e\n ```\n you can parse the page by either the id or class parameter\n \n```swift\n  import webparser\n   \n  let url = parser.init()\n   \n  url.get_the_page_info(body_prase: [\"page\",\"container-width-only\"], return_method: \"HTML\", url_string: url_string!,      {(title, description, previewImage,body_div) -\u003e Void in\n            \n            print(body_div[\"article_body\"])\n        }\n            , failure: { (errorMessage) -\u003e Void in\n                print(errorMessage)\n        })\n ```\n \n## Steps \u0026 functions\n\nInitialise  parser.init()\n\nNow you can use the function\n\n```swift \nget_the_page_info(body_prase:[String],return_method:String,url_string:URL,_ completion: @escaping ((_ title: String?, _ description: String?, _ previewImage: String?,_ body_div:[String:[String]] ) -\u003e Void), failure: @escaping ((_ errorMessage: String) -\u003e Void))\n```\nInput parameters: \n  1) body_prase --\u003e String Array eg) [\"page\",\"container-width-only\"]\n  2)return_method ---\u003e String which will accepet either \"HTML\" or \"TEXT\n  3)url_string ---\u003e URL datatype\n \nOutput Parameter:\n 1) title: String?, --\u003e will return Titte of the page\n 2) description: String?,--\u003e will return Description of the page \n 3) previewImage:: String? will return preview image of the page just like seen in facebook  \n 4) body_div:[String:[String]] --\u003e which will parse the url will return a array dictionary with key ad Input parameter given     in body_prase\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichan18%2Fwebparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichan18%2Fwebparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichan18%2Fwebparser/lists"}