kaustubhhiware / facebook-archive

Just some fun you can have with facebook's archive data
MIT License
74 stars 42 forks source link

EXIF Data for archived photos #37

Open mothinx opened 5 years ago

mothinx commented 5 years ago

Description

As a facebook-archive user, I need to have EXIF Data (at least Date and Time (original)) from my photos archived, so that I can upload / store this photos in an organized manner.

Explanation

Facebook archive doesn't provide EXIF data from your photos. There is a way to obtain it by going to you_archive/photos_and_videos folder/album . Here, there is all your albums in .html format. In each .html, there is each photos and a link with photo timestamp.

Acceptance Criteria

Update [Required]

Definition of Done

Estimation

1 Day

mothinx commented 5 years ago

Here is an exemple from my personal archive. This snippet is from photos_and_videos / album / 0.html

`                    <div class="_4t5n" role="main">
                        <div class="pam _3-95 _2pi0 _2lej uiBoxWhite noborder">
                            <div class="_3-96 _2pio _2lek _2lel">*** SKYDIVE 2014 ***</div>
                            <div class="_3-96 _2let"><a
                                    href="photos_and_videos/SKYDIVE2014_diOOTUIv-Q/1932613_10203346603445505_535856720_o_10203346603445505.jpg"><img
                                        src="photos_and_videos/SKYDIVE2014_diOOTUIv-Q/1932613_10203346603445505_535856720_o_10203346603445505.jpg"
                                        class="_2yuc _3-96" /></a>
                                <table class="uiGrid _51mz" cellspacing="0" cellpadding="0">
                                    <tbody>
                                        <tr class="_51mx">
                                            <td class="_51m- _2oao">
                                                <div class="_tqp">Adresse IP de la source</div>
                                            </td>
                                            <td class="_51m- _2piu _23bw _51mw">
                                                <div class="_tqp">90.15.246.173</div>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                            <div class="_3-94 _2lem"><a
                                    href="https://www.facebook.com/dyi/l/?l=ASa1NyxL4-8y60uZsS0Bam71qjzs42heqE_OiODBgYp48AK6SgAtKkGXQOXbtDay35AGlazsgdx3te7Y8fki0YZQ50ABMVwmbaUKhSzAjubkW7BxXvKYZazDLDCQapLLEuU5htSlg5heMkUHXHLb1YlTKNHSZV3YO4Tr4zjn">8
                                    mars 2014 à 19:16</a></div>
 </div>`

In these files, you can see the src (means where this photography is saved) and on <div class="_3-94 _2lem"> the picture date.

mothinx commented 5 years ago

Here is a draft of the logic behind this.

FOR EACH .html files in photos_and_videos/album
    FOR EACH src found in html file
        Take the date from text inside <div class="_3-94 _2lem"> / href
        Add the date to the EXIF of the photo pointed by the src
    END FOR EACH
END FOR EACH
kaustubhhiware commented 5 years ago

Thanks for bringing this to the attention @mothinx :smile: However, this project is not under active development and facebook archive seems to keep changing its schema every few months :/ I'll work on this if and when I get time.

mothinx commented 5 years ago

To be honest i'm a java developer and i need this feature for my personal case (i'm currently deleting all my digital footprint). I just checked github for some applications to work with facebook-archive and you are the only one i found 😄 I can work on this feature if you want, just give me some basic guidelines (what kind of files i need to modify / create) and i will PR