{"action":"created","issue":{"url":"https://api.github.com/repos/scrapinghub/portia/issues/368","repository_url":"https://api.github.com/repos/scrapinghub/portia","labels_url":"https://api.github.com/repos/scrapinghub/portia/issues/368/labels{/name}","comments_url":"https://api.github.com/repos/scrapinghub/portia/issues/368/comments","events_url":"https://api.github.com/repos/scrapinghub/portia/issues/368/events","html_url":"https://github.com/scrapinghub/portia/issues/368","id":131985745,"number":368,"title":"Multiple Fields","user":{"login":"Gwai2Lo2","id":17036082,"avatar_url":"https://avatars.githubusercontent.com/u/17036082?v=3","gravatar_id":"","url":"https://api.github.com/users/Gwai2Lo2","html_url":"https://github.com/Gwai2Lo2","followers_url":"https://api.github.com/users/Gwai2Lo2/followers","following_url":"https://api.github.com/users/Gwai2Lo2/following{/other_user}","gists_url":"https://api.github.com/users/Gwai2Lo2/gists{/gist_id}","starred_url":"https://api.github.com/users/Gwai2Lo2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gwai2Lo2/subscriptions","organizations_url":"https://api.github.com/users/Gwai2Lo2/orgs","repos_url":"https://api.github.com/users/Gwai2Lo2/repos","events_url":"https://api.github.com/users/Gwai2Lo2/events{/privacy}","received_events_url":"https://api.github.com/users/Gwai2Lo2/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-07T17:00:05Z","updated_at":"2016-02-08T04:26:21Z","closed_at":null,"body":"Hi all,\r\n\r\nI need to extract more then one field out of a single annotation. All of them must be based on the attribute content. In the past it seems that there was an add field button, which might would provide the solution I'm looking for but in the current version I can't find this button anymore.\r\n\r\n![portia-create-annotation](https://cloud.githubusercontent.com/assets/17036082/12873681/cc81b840-cdfe-11e5-9a23-45f33ea0a35d.png)\r\n\r\nThe documentation says the following but I have no clue where I can find the Attribute mappings.\r\n> Multiple fields\r\nIt’s possible to extract multiple fields using a single annotation if there are several properties you want to extract from an element. For example, if there was an anchor link on the page, you could map the href attribute containing the URL to one field, and you could map the text to another. You can view a particular annotation’s settings by either clicking the cog in the annotation pop-up window or by clicking the cog beside the annotation in the Annotations section of the sample configuration. Within this context there is an Attribute mappings section where you can define additional mappings for the selected annotation should you want to map other attributes."},"comment":{"url":"https://api.github.com/repos/scrapinghub/portia/issues/comments/181190818","html_url":"https://github.com/scrapinghub/portia/issues/368#issuecomment-181190818","issue_url":"https://api.github.com/repos/scrapinghub/portia/issues/368","id":181190818,"user":{"login":"Gwai2Lo2","id":17036082,"avatar_url":"https://avatars.githubusercontent.com/u/17036082?v=3","gravatar_id":"","url":"https://api.github.com/users/Gwai2Lo2","html_url":"https://github.com/Gwai2Lo2","followers_url":"https://api.github.com/users/Gwai2Lo2/followers","following_url":"https://api.github.com/users/Gwai2Lo2/following{/other_user}","gists_url":"https://api.github.com/users/Gwai2Lo2/gists{/gist_id}","starred_url":"https://api.github.com/users/Gwai2Lo2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gwai2Lo2/subscriptions","organizations_url":"https://api.github.com/users/Gwai2Lo2/orgs","repos_url":"https://api.github.com/users/Gwai2Lo2/repos","events_url":"https://api.github.com/users/Gwai2Lo2/events{/privacy}","received_events_url":"https://api.github.com/users/Gwai2Lo2/received_events","type":"User","site_admin":false},"created_at":"2016-02-08T04:26:21Z","updated_at":"2016-02-08T04:26:21Z","body":"Alright, I figured it out by myself. To extract multiple items from a single annotation is only possible by extracting one as content and the other one as href, to extract two fields as content is not possible.\r\n\r\nIs this not possible as it might would slow down the scraping process?\r\n\r\nThe other possibility would be to extract multiple items from a single annotation with the help of assigning multiple extractors using RegEx but therefore there multiple fields would be required as well which is not possible at the moment.\r\n\r\nOnly solution for now seems to be to extract multiple items from a single annotation in the post process of the data outside of portia."}}